issues: 303130664
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 303130664 | MDU6SXNzdWUzMDMxMzA2NjQ= | 1973 | question: dataset variables as coordinates | 10928117 | closed | 0 | 1 | 2018-03-07T14:57:19Z | 2019-01-13T21:00:29Z | 2019-01-13T21:00:29Z | NONE | Problem descriptionLet's consider two datasets, ```python import xarray as xr import numpy as np x = np.linspace(0, 1, 10) da1 = xr.concat([xr.DataArray(x2, coords={'x': x, 'a': 0}, dims='x'), xr.DataArray(x2+1, coords={'x': x+1, 'a': 1}, dims='x')], dim='a') ds1 = da1.to_dataset(name='y') ds2 = xr.concat([xr.Dataset({'x': ('n', x), 'y': ('n', x2)}, coords={'n': range(10), 'a': 0}), xr.Dataset({'x': ('n', x+1), 'y': ('n', x2+1)}, coords={'n': range(10), 'a': 1})], dim='a') ``` These two datasets represents in principle the same data, stored in two different ways. ```python
QuestionIs there a straightforward way to reshape Second structure however is more natural when Output of
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/1973/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |