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
I opened the "air_temperature" dataset using the scipy engine, sliced on a dimension with a list of index and received a seemingly "incomplete" object. It raises AttributeError: 'DataArray' object has no attribute 'data' and similar with values.
What did you expect to happen?
I expected the sliced result to be a normal DataArray.
aulemahal
changed the title
Unloaded DataArray missing attributes when sliced with a sequence
Unloaded DataArray opened with scipy missing attributes when sliced with a sequence
Jul 31, 2024
Turns out this does not happen when the dataset is opened with netCDF4, but it does with scipy. I updated the issue.
Sorry I thus misattributed this to xarray 2024.07, but the error also happens with 2024.06.0.
For context, we had too many issues with netCDF4's recent updates on one of our CI and it was much easier to simply remove it. Almost all other datasets we use are NETCDF4/HDF5, except the few calls in some notebooks to "air_temperature", which is NETCDF3 and opens with scipy.
What happened?
I opened the "air_temperature" dataset using the scipy engine, sliced on a dimension with a list of index and received a seemingly "incomplete" object. It raises
AttributeError: 'DataArray' object has no attribute 'data'
and similar withvalues
.What did you expect to happen?
I expected the sliced result to be a normal DataArray.
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
If I
ds.air.load()
first, this doesn't happen.Environment
INSTALLED VERSIONS
commit: None
python: 3.12.4 | packaged by conda-forge | (main, Jun 17 2024, 10:23:07) [GCC 12.3.0]
python-bits: 64
OS: Linux
OS-release: 6.9.6-200.fc40.x86_64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: fr_CA.UTF-8
LOCALE: ('fr_CA', 'UTF-8')
libhdf5: 1.14.3
libnetcdf: None
xarray: 2024.7.0
pandas: 2.2.2
numpy: 2.0.1
scipy: 1.14.0
netCDF4: None
pydap: None
h5netcdf: 1.3.0
h5py: 3.11.0
zarr: None
cftime: 1.6.4
nc_time_axis: 1.4.1
iris: None
bottleneck: 1.4.0
dask: 2024.7.1
distributed: 2024.7.1
matplotlib: 3.9.1
cartopy: None
seaborn: None
numbagg: None
fsspec: 2024.6.1
cupy: None
pint: 0.24.3
sparse: 0.16.0a10.dev3+ga73b20d
flox: 0.9.8
numpy_groupies: 0.11.1
setuptools: 71.0.4
pip: 24.1.2
conda: None
pytest: 7.4.4
mypy: 1.11.0
IPython: 8.26.0
sphinx: 7.4.7
The text was updated successfully, but these errors were encountered: