-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
xarray.rolling_window
Converts dims
Argument from Tuple to List Causing Issues for Cupy-Xarray
#7890
Comments
Thanks for opening your first issue here at xarray! Be sure to follow the issue template! |
This seems like a real easy fix?
EDIT: the Array API seems to type |
@dcherian : agreed! But I am afraid it might break other components. |
I think the only other one is dask, which should also work. |
@negin513 would you mind creating a PR for this? |
@headtr1ck Thanks. I created the corresponding PR for this : #7938 |
What is your issue?
Hello,
I'm currently working on the development of cupy_xarray, and I've come across an issue with
xarray.rolling_window
. Specifically, it seems that thedims
argument gets automatically converted to a list from a tuple.While numpy.normalize_axis_tuple can handle lists, thereby not raising errors when using numpy-backed xarray objects, its cupy equivalent (cupy.core.internal._normalize_axis_indices) does not. When a list is passed, it raises the following error:
It seems the line that might fix this is L2487:
xarray/xarray/core/variable.py
Lines 2487 to 2494 in c9d89e2
For the time being, we've managed to devise a workaround in cupy, but I thought it would be worthwhile to bring this to your attention.
Relevant Cupy PR: cupy/cupy#7575
Contributor: @dcherian
The text was updated successfully, but these errors were encountered: