question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Raster supports (MxNx3) clashes with docstring

See original GitHub issue

Doing

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:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
philippjfrcommented, Nov 4, 2018

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.

1reaction
jlstevenscommented, Jul 31, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found