issues: 130753818
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
130753818 | MDU6SXNzdWUxMzA3NTM4MTg= | 742 | merge and align DataArrays/Datasets on different domains | 8982598 | closed | 0 | 11 | 2016-02-02T17:27:17Z | 2017-01-23T22:42:18Z | 2017-01-23T22:42:18Z | CONTRIBUTOR | Firstly, I think For example consider this setup: ``` python import xarray as xr x1 = [100] y1 = [1, 2, 3, 4, 5] dat1 = [[101, 102, 103, 104, 105]] x2 = [200] y2 = [3, 4, 5, 6] # different size and domain dat2 = [[203, 204, 205, 206]] da1 = xr.DataArray(dat1, dims=['x', 'y'], coords={'x': x1, 'y': y1}) da2 = xr.DataArray(dat2, dims=['x', 'y'], coords={'x': x2, 'y': y2}) ``` I would like to aggregate such DataArrays into a new, single DataArray with ``` python
Here is a quick function I wrote to do such but I would worried about the performance of 'expanding' the new data to the old data's size every iteration (i.e. supposing that the first argument is a large DataArray that you are adding to but doesn't necessarily contain the dimensions already).
Might this be (or is this already!) possible in simpler form in |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/742/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |