-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Passing in DataArray into np.linspace
breaks with Numpy 2
#9043
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
Comments
I've recently come across this as well (in a suddenly failing xcube unit test) and confirmed its presence in the current xarray repo version (commit b518074). In the xcube case, we've worked around the immediate problem but have a few dozen other |
Add some item() calls to get true scalars to pass for image extent in declarative.
Add some item() calls to get true scalars to pass for image extent in declarative.
With numpy 1.26, the value returned by In numpy 2.0, I'm not sure there is a way to fix this in xarray, except for maybe creating some default dimension. Since To fix this issue in our code, I added a function to replace
@pont-us you could find and replace Edit: actually mypy still doesn't like this, probably because the values from the |
What happened?
Trying to be compatible with Numpy 2, I discovered the following behavior change.
I could work around it, so it's not urgent for me to be fixed and can be marked as
wontfix
.What did you expect to happen?
No response
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
No response
Environment
The text was updated successfully, but these errors were encountered: