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 have a dataset along many dimensions, e.g. time and experiments. Some of the dataarrays only contain strings and only have the experiments as dimension. When I use ds.mean('time') I lose these dataarrays.
What you expected to happen:
I would expect that the mean on the full dataset would be similar that what happends with float dataarrays that don't contain the dimension: just return them unchanged. As shown in the minimal example attached, using ds.min produced the result I would expect.
Minimal Complete Verifiable Example:
Here da1 corresponds to my dataarrays that are lost. da3 produced what I would expect (same result no matter the data type).
What happened:
I have a dataset along many dimensions, e.g. time and experiments. Some of the dataarrays only contain strings and only have the experiments as dimension. When I use
ds.mean('time')
I lose these dataarrays.What you expected to happen:
I would expect that the mean on the full dataset would be similar that what happends with float dataarrays that don't contain the dimension: just return them unchanged. As shown in the minimal example attached, using ds.min produced the result I would expect.
Minimal Complete Verifiable Example:
Here
da1
corresponds to my dataarrays that are lost.da3
produced what I would expect (same result no matter the data type).And the output is:
I searched in the opened issues but haven't seen any similar one. I hope I did not miss anything there nor in the doc.
Environment:
Output of xr.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0]
python-bits: 64
OS: Linux
OS-release: 5.8.0-50-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
libhdf5: 1.12.0
libnetcdf: 4.7.4
xarray: 0.18.0
pandas: 1.2.4
numpy: 1.20.3
scipy: 1.6.3
netCDF4: 1.5.6
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: 1.4.1
nc_time_axis: 1.2.0
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 2021.05.0
distributed: 2021.05.0
matplotlib: 3.4.2
cartopy: 0.19.0.post1
seaborn: 0.11.1
numbagg: None
pint: None
setuptools: 44.0.0
pip: 20.0.2
conda: None
pytest: 6.2.4
IPython: 7.23.1
sphinx: None
The text was updated successfully, but these errors were encountered: