issues: 518966560
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
518966560 | MDU6SXNzdWU1MTg5NjY1NjA= | 3490 | Dataset global attributes dropped when performing operations against numpy data type | 7799184 | closed | 0 | 2 | 2019-11-07T00:22:04Z | 2020-10-14T16:29:51Z | 2020-10-14T16:29:51Z | CONTRIBUTOR | Operations against numpy data types seem cause global attributes in dataset to be dropped, example below. I also noticed in a real dataset with multiple dimensions that the order of ``` In [1]: import numpy as np In [2]: import pandas as pd In [3]: import xarray as xr In [4]: dset = xr.DataArray( ...: np.random.rand(4, 3), ...: [("time", pd.date_range("2000-01-01", periods=4)), ("space", ["IA", "IL", "IN"])], ...: name="test", ...: ).to_dataset() ...: dset.attrs = {"attr1": "val1", "attr2": "val2"} In [5]: 1.0 * dset In [6]: np.float64(1.0) * dset In [7]: xr.version |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3490/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |