You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)
Python 3.9
bokeh 2.4.2
xarray 0.21.1
hvplot 0.7.3
holoviews: 1.14.6 / 1.14.7
Description of expected behavior and the observed behavior
The issue is created by a new requirement of holoviews in 1.14.7 that clashes with the xarray hvplot extension.
xarrays can have NON-dimension coordinates that were previously ignored (correctly, IMHO) when defining what goes into the dynamic map generation for undefined kdims by hvplot.
Complete, minimal, self-contained example code that reproduces the issue
# code goes here between backticks
import xarray as xr
import hvplot.xarray
import holoviews as hv
hv.extension('bokeh', inline=False)
arr = xr.DataArray(
np.random.random((2, 3, 4)),
dims=['x', 'y', 'time'],
coords={'x': np.arange(2), 'y': np.arange(3), 'time': np.arange(4), 'x2': ('x', np.arange(2)*2)}
)
arr.hvplot(x='x', y='y')
With 1.14.6, hvplot creates, as expected a nice dynamic map, scanning the remaining unspecified time dimension with a widget:
With 1.14.7, I get this complaint from holoviews:
DataError: The coordinates on the 'value' DataArray do not match the provided key dimensions (kdims). The following coords were left unspecified: ['x2']. 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.
This change is a pretty big impact on how to work with xarray, I have dozens of codes that rely on the fact that only the dimension coordinates are being considered as kdims.
The whole data model of xarray builds around the idea of carrying other representation of coordinates (meters <-> lat/lon e.g.) with only one being the dimension coordinate at a given time, and demanding to do something with those before hvplot would work is a strong reduction in usefulness for hvplot, IMHO.
Screenshots or screencasts of the bug in action
The text was updated successfully, but these errors were encountered:
ALL software version info
(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)
Python 3.9
bokeh 2.4.2
xarray 0.21.1
hvplot 0.7.3
holoviews: 1.14.6 / 1.14.7
Description of expected behavior and the observed behavior
The issue is created by a new requirement of holoviews in 1.14.7 that clashes with the xarray hvplot extension.
xarrays can have NON-dimension coordinates that were previously ignored (correctly, IMHO) when defining what goes into the dynamic map generation for undefined kdims by hvplot.
Complete, minimal, self-contained example code that reproduces the issue
With 1.14.6, hvplot creates, as expected a nice dynamic map, scanning the remaining unspecified
time
dimension with a widget:With 1.14.7, I get this complaint from
holoviews
:This change is a pretty big impact on how to work with xarray, I have dozens of codes that rely on the fact that only the dimension coordinates are being considered as kdims.
The whole data model of xarray builds around the idea of carrying other representation of coordinates (meters <-> lat/lon e.g.) with only one being the dimension coordinate at a given time, and demanding to do something with those before
hvplot
would work is a strong reduction in usefulness for hvplot, IMHO.Screenshots or screencasts of the bug in action
The text was updated successfully, but these errors were encountered: