Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of 3-channel RGB element #558

Merged
merged 1 commit into from
Feb 17, 2022
Merged

Fix handling of 3-channel RGB element #558

merged 1 commit into from
Feb 17, 2022

Conversation

philippjfr
Copy link
Member

The hv.RGB constructor adds the alpha channel if needed so it should not be declared in the parameter definition.

Fixes #522

@philippjfr philippjfr merged commit 67de929 into master Feb 17, 2022
@stas-sl
Copy link

stas-sl commented Feb 19, 2022

Looks like after this change the following code stopped working:

import numpy as np
import geoviews as gv
from holoviews.operation.datashader import datashade

gv.extension('bokeh')

datashade(gv.Points(np.random.randn(100000, 2)))

It throws

The coordinates on the 'R' DataArray do not match the provided key dimensions (kdims). The following coords were left unspecified: ['band']. If you are requesting a lower dimensional view such as a histogram cast the xarray to a columnar format using the .to_dataframe or .to_dask_dataframe methods before providing it to HoloViews.

But if I revert this change, everything works well.

@philippjfr
Copy link
Member Author

Damn, thanks for reporting that. We'll have to follow up with another release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gv.RGB does not work with NxMx3 arrays
2 participants