You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a multiple dimensions xarray (like time, x and y), the quadratic function is not working anymore with interpolate, it returns only nan. slinear is ok. quadratic is only ok when using only a dimension (like only a lat/lon value).
What did you expect to happen?
No response
Minimal Complete Verifiable Example
importxarrayasxrds=xr.tutorial.load_dataset("ersstv5")
# Generate a subsetsubset=ds['sst'].isel(time=slice(0,10),lat=slice(20,40),lon=slice(20,40))
## Plot imagessubset.plot(col="time",col_wrap=6)
# Interpolate with quadraticsubset_quadratic=subset.resample(time='10D').interpolate('quadratic')
## subset_quadratic is now full of NaNsubset_quadratic.plot(col="time",col_wrap=6)
# Working with only time dimensionsubset_quadratic=subset.isel(lat=0,lon=0).resample(time='10D').interpolate('quadratic')
subset_quadratic.plot()
MVCE confirmation
Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
Complete example — the example is self-contained, including all data and the text of any traceback.
Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
New issue — a search of GitHub Issues suggests this is not a duplicate.
Recent environment — the issue occurs with the latest version of xarray and its dependencies.
Relevant log output
No response
Anything else we need to know?
No response
Environment
INSTALLED VERSIONS
------------------
commit: None
python: 3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:20:11) [MSC v.1938 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 11
machine: AMD64
processor: Intel64 Family 6 Model 186 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en
LOCALE: ('fr_FR', 'cp1252')
libhdf5: 1.14.3
libnetcdf: None
Thanks for opening your first issue here at xarray! Be sure to follow the issue template!
If you have an idea for a solution, we would really welcome a Pull Request with proposed changes.
See the Contributing Guide for more.
It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better.
Thank you!
What happened?
When using a multiple dimensions xarray (like time, x and y), the quadratic function is not working anymore with interpolate, it returns only nan. slinear is ok. quadratic is only ok when using only a dimension (like only a lat/lon value).
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
xarray: 2024.5.0
pandas: 2.1.4
numpy: 1.26.4
scipy: 1.13.0
netCDF4: None
pydap: None
h5netcdf: 1.3.0
h5py: 3.11.0
zarr: 2.18.0
cftime: None
nc_time_axis: None
iris: None
bottleneck: None
dask: 2024.5.0
distributed: 2024.5.0
matplotlib: 3.8.4
cartopy: None
seaborn: 0.13.2
numbagg: None
fsspec: 2024.3.1
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 69.5.1
pip: 24.0
conda: None
pytest: None
mypy: None
IPython: 8.24.0
sphinx: 7.3.7
The text was updated successfully, but these errors were encountered: