-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Test dev releases of numpy 2.0 and numba 0.60.0 #1332
Conversation
Okay, the last failing tests seem to be related to xarray: import numpy as np
import xarray as xr
arr = np.array([1,2,3,4])
xarr = xr.DataArray(arr, coords=[('x', arr)])
np.linspace(xarr[0], xarr[-1], len(xarr)) Traceback (most recent call last):
File "/home/shh/projects/holoviz/repos/datashader/example.py", line 6, in <module>
np.linspace(xarr[0], xarr[-1], len(xarr))
File "/home/shh/miniconda3/envs/datashader-dev/lib/python3.12/site-packages/numpy/_core/function_base.py", line 189, in linspace
y = conv.wrap(y.astype(dtype, copy=False))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shh/miniconda3/envs/datashader-dev/lib/python3.12/site-packages/xarray/core/dataarray.py", line 4685, in __array_wrap__
new_var = self.variable.__array_wrap__(obj, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shh/miniconda3/envs/datashader-dev/lib/python3.12/site-packages/xarray/core/variable.py", line 2294, in __array_wrap__
return Variable(self.dims, obj)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shh/miniconda3/envs/datashader-dev/lib/python3.12/site-packages/xarray/core/variable.py", line 397, in __init__
super().__init__(
File "/home/shh/miniconda3/envs/datashader-dev/lib/python3.12/site-packages/xarray/namedarray/core.py", line 264, in __init__
self._dims = self._parse_dimensions(dims)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shh/miniconda3/envs/datashader-dev/lib/python3.12/site-packages/xarray/namedarray/core.py", line 490, in _parse_dimensions
raise ValueError(
ValueError: dimensions () must have the same length as the number of data dimensions, ndim=1
@dcherian, should I open an issue in xarray? Or are you already aware of it? We have worked around it, so we do no need to get this fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Sorry I missed your ping @hoxbro An issue would be helpful. Even if it's a wontfix, it would be nicer to document it on the xarrAy repo |
Resolves #1324