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

Slicing with xarray backend does not work if axis is reversed #2658

Closed
drs251 opened this Issue May 7, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@drs251
Contributor

drs251 commented May 7, 2018

This one is quite subtle: everything works nicely, until you try to slice a Curve or an Image:

import xarray as xr
import holoviews as hv
xs = np.arange(30)[::-1]
ys = np.random.rand(30)
array = xr.DataArray(ys, coords=[('x', xs)], name='y')
hv.Dataset(array).to(hv.Curve)[5:15]

Removing [::-1] solves the problem, but when working with real xarray objects, this is not so easy sometimes, so it would be great to fix this.

(This was tested on version 1.10.2)

@philippjfr philippjfr added this to the v1.10.3 milestone May 7, 2018

@philippjfr philippjfr referenced this issue May 7, 2018

Merged

Fixed slicing on inverted axis in xarray #2660

2 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment