issues: 532878771
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
532878771 | MDU6SXNzdWU1MzI4Nzg3NzE= | 3595 | xr.Dataset.map drops attrs of DataArray | 10194086 | closed | 0 | 6 | 2019-12-04T19:11:35Z | 2020-10-14T16:29:52Z | 2020-10-14T16:29:52Z | MEMBER | MCVE Code Sample```python import xarray as xr import numpy as np ds = xr.DataArray([1, 2], attrs=dict(tst="DataArray")).to_dataset(name="data") ds.attrs["tst"] = "Dataset" ds.map(np.mean, keep_attrs=True).data ``` returns
Expected Output
Problem DescriptionApplying In constrast EDIT: corrected example Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3595/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |