issues: 1589771368
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1589771368 | I_kwDOAMm_X85ewfxo | 7541 | standard deviation over one dimension of a chunked DataArray leads to NaN | 11750960 | closed | 0 | 2 | 2023-02-17T18:07:06Z | 2023-02-17T18:12:10Z | 2023-02-17T18:12:10Z | CONTRIBUTOR | What happened?When computing the standard deviation over one dimension of a chunked DataArray, one may get NaNs. What did you expect to happen?We should not have any NaNs Minimal Complete Verifiable Example```Python x = (np.random.randn(10,10) + 1j*np.random.randn(10,10)) da = xr.DataArray(x).chunk(dict(dim_0=3)) da.std("dim_0").compute() # NaN
da.compute().std("dim_0") # no NaNs
MVCE confirmation
Relevant log outputNo response Anything else we need to know?No response Environment
INSTALLED VERSIONS
------------------
commit: None
python: 3.10.8 (main, Nov 24 2022, 08:09:04) [Clang 14.0.6 ]
python-bits: 64
OS: Darwin
OS-release: 22.3.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: fr_FR.UTF-8
LOCALE: ('fr_FR', 'UTF-8')
libhdf5: 1.12.2
libnetcdf: 4.8.1
xarray: 2022.12.0
pandas: 1.5.2
numpy: 1.23.5
scipy: 1.9.3
netCDF4: 1.6.2
pydap: None
h5netcdf: None
h5py: 3.7.0
Nio: None
zarr: 2.13.3
cftime: 1.5.1.1
nc_time_axis: None
PseudoNetCDF: None
rasterio: 1.3.4
cfgrib: None
iris: None
bottleneck: 1.3.5
dask: 2022.02.1
distributed: 2022.2.1
matplotlib: 3.6.2
cartopy: 0.21.1
seaborn: 0.12.1
numbagg: None
fsspec: 2022.11.0
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 65.5.0
pip: 22.3.1
conda: None
pytest: None
mypy: None
IPython: 8.7.0
sphinx: None
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/7541/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |