issues: 1406633320
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1406633320 | I_kwDOAMm_X85T14Vo | 7157 | AttributeError raised when DataArray.reduce is called directly | 22195223 | closed | 0 | 2 | 2022-10-12T18:31:33Z | 2022-10-13T17:22:42Z | 2022-10-13T17:22:42Z | CONTRIBUTOR | What happened?I'm running into an issue when trying to directly use the DataArray.reduce method: At first I used DataArray.cumsum to see the expected behavior: ```
What did you expect to happen?I expect to get the same output I got from calling Minimal Complete Verifiable Example```Python import xarray as xr import numpy as np data = np.arange(12).reshape(4,3) da = xr.DataArray(data=data, dims=['x', 'y'], coords={'x': [10, 20, 30, 40], 'y': [70, 80, 90]}) func = xr.DataArray.cumsum da.reduce(func=func, dim='x') ``` MVCE confirmation
Relevant log output
Anything else we need to know?No response Environment
C:\Users\GoMaN\miniconda3\envs\xarray-tests3.9\lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
INSTALLED VERSIONS
------------------
commit: f460357a9246f093d9f7a02693e577c307b0839a
python: 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:51:29) [MSC v.1929 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 69 Stepping 1, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: ('English_United States', '1252')
libhdf5: None
libnetcdf: None
xarray: 0.1.dev4331+gb33ad6d.d20221005
pandas: 1.5.0
numpy: 1.23.3
scipy: 1.9.1
netCDF4: None
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: None
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: None
distributed: None
matplotlib: None
cartopy: None
seaborn: None
numbagg: None
fsspec: None
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 65.4.1
pip: 22.2.2
conda: None
pytest: 7.1.3
IPython: None
sphinx: None
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/7157/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |