Raster supports (MxNx3) clashes with docstring
See original GitHub issueDoing
img = hv.Raster(img)
img
inside a ipython notebook, I get a fine color display of the image array with dimensions (MxNx3), despite the docstring saying:
Raster is a basic 2D element type for presenting either numpy or
dask arrays as two dimensional raster images.
Arrays with a shape of (N,M) are valid inputs for Raster wheras
subclasses of Raster (e.g. RGB) may also accept 3D arrays
containing channel information.
Using latest version on conda-forge.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The main issue here is that we don’t have proper support for aspects, I totally agree that the default behavior should be to respect aspects. That being said I don’t think it should be dependent on the way the data was defined, instead I think we should change the default
bounds
of images to match the shape of the image rather than the arbitrary -0.5 to 0.5 range we currently use.I’ll address the issue referenced in the title shortly.
That is equivalent to respecting the aspect for the default (i.e ‘x’,‘y’) kdims only and not otherwise. You could use
redim
to rename those dimensions after the fact.This seems a little bit inconsistent to me: I would prefer to respect the aspect when the
bounds
are not explicitly supplied, instead of involving the key dimensions.