issues: 1052736383
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1052736383 | I_kwDOAMm_X84-v3t_ | 5983 | preserve chunked data when creating DataArray from itself | 19226431 | closed | 0 | 4 | 2021-11-13T18:00:24Z | 2022-01-13T17:02:47Z | 2022-01-13T17:02:47Z | CONTRIBUTOR | What happened: When creating a new DataArray from a DataArray with chunked data, the underlying dask array is converted to a numpy array. What you expected to happen: I expected the underlying dask array to be preseved when creating a new DataArray instance. Minimal Complete Verifiable Example: ```python import xarray as xr import numpy as np from dask import array d = np.ones((10, 10)) x = array.from_array(d, chunks=5) da = xr.DataArray(x) # this is chunked xr.DataArray(da) # this is not chunked anymore ``` Anything else we need to know?: Environment: Output of <tt>xr.show_versions()</tt>INSTALLED VERSIONS ------------------ commit: None python: 3.9.7 (default, Sep 16 2021, 13:09:58) [GCC 7.5.0] python-bits: 64 OS: Linux OS-release: 5.11.0-40-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: ('en_US', 'UTF-8') libhdf5: 1.10.6 libnetcdf: 4.7.4 xarray: 0.19.0 pandas: 1.3.3 numpy: 1.20.3 scipy: 1.7.1 netCDF4: 1.5.6 pydap: None h5netcdf: 0.11.0 h5py: 3.2.1 Nio: None zarr: 2.10.1 cftime: 1.5.0 nc_time_axis: None PseudoNetCDF: None rasterio: 1.2.6 cfgrib: None iris: None bottleneck: 1.3.2 dask: 2021.09.1 distributed: 2021.09.1 matplotlib: 3.4.3 cartopy: 0.19.0.post1 seaborn: 0.11.2 numbagg: None pint: None setuptools: 58.0.4 pip: 21.2.4 conda: 4.10.3 pytest: 6.2.5 IPython: 7.27.0 sphinx: 4.2.0 |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/5983/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |