issues: 727623263
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
727623263 | MDU6SXNzdWU3Mjc2MjMyNjM= | 4529 | Dataset constructor with DataArray triggers computation | 6130352 | closed | 0 | 5 | 2020-10-22T18:27:24Z | 2021-02-19T23:13:57Z | 2021-02-19T23:13:57Z | NONE | Is it intentional that creating a Dataset with a DataArray and dimension names for a single variable causes computation of that variable? In other words, why does A longer example: ```python import dask.array as da import xarray as xr x = da.random.randint(1, 10, size=(100, 25)) ds = xr.Dataset(dict(a=xr.DataArray(x, dims=('x', 'y')))) type(ds.a.data) dask.array.core.Array Recreate the dataset with the same array, but also redefine the dimensionsds2 = xr.Dataset(dict(a=(('x', 'y'), ds.a)) type(ds2.a.data) numpy.ndarray ``` |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4529/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |