-
-
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
storing results of interpolate_na into numpy.array #9312
Comments
Thanks for opening your first issue here at xarray! Be sure to follow the issue template! |
@Breeze-Hu Thanks for bringing this to attention. It looks like we need to add I'm wondering if it is enough to add Lines 165 to 166 in b22c429
like so: def __array__(self: Any, dtype: DTypeLike | None = None, copy: bool | None = None) -> np.ndarray:
return np.asarray(self.values, dtype=dtype, copy=copy) |
Thanks to the developers for looking at this. |
What happened?
Storing the interpolated results into numpy.zero will prompt a problem. But I'm not quite sure if it's due to xarray or numpy 2.0. Show: DeprecationWarning: array implementation doesn't accept a copy keyword……
And the problem doesn't occur in one dimensional arrays, but it does in two dimensions.
What did you expect to happen?
No response
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
No response
Anything else we need to know?
No response
Environment
INSTALLED VERSIONS
commit: None
python: 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:34:54) [Clang 16.0.6 ]
python-bits: 64
OS: Darwin
OS-release: 23.6.0
machine: arm64
processor: arm
byteorder: little
LC_ALL: None
LANG: None
LOCALE: (None, 'UTF-8')
libhdf5: 1.14.3
libnetcdf: 4.9.2
xarray: 2024.7.0
pandas: 2.2.2
numpy: 2.0.1
scipy: 1.14.0
netCDF4: 1.7.1
pydap: None
h5netcdf: 1.3.0
h5py: 3.11.0
zarr: None
cftime: 1.6.4
nc_time_axis: None
iris: None
bottleneck: None
dask: None
distributed: None
matplotlib: 3.9.1
cartopy: 0.23.0
seaborn: None
numbagg: None
fsspec: None
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 72.1.0
pip: 24.2
conda: None
pytest: None
mypy: None
IPython: 8.26.0
sphinx: None
The text was updated successfully, but these errors were encountered: