issues: 126021504
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
126021504 | MDU6SXNzdWUxMjYwMjE1MDQ= | 714 | Setting a Dataset variable with dot notation fails silently | 5635139 | closed | 0 | 1 | 2016-01-11T19:45:39Z | 2016-01-12T18:50:26Z | 2016-01-12T18:50:26Z | MEMBER | On master: ``` python In [4]: xray.Dataset({'a': xray.DataArray(pd.np.random.rand(10,3))}) Out[4]: <xray.Dataset> Dimensions: (dim_0: 10, dim_1: 3) Coordinates: * dim_0 (dim_0) int64 0 1 2 3 4 5 6 7 8 9 * dim_1 (dim_1) int64 0 1 2 Data variables: a (dim_0, dim_1) float64 0.2804 0.4567 0.8415 0.1367 0.3122 ... In [5]: ds=xray.Dataset({'a': xray.DataArray(pd.np.random.rand(10,3))}) In [6]: ds.a Out[6]: <xray.DataArray 'a' (dim_0: 10, dim_1: 3)> array([[ 0.19862294, 0.40265588, 0.07676118], [ 0.54722942, 0.47329196, 0.64441943], [ 0.73762014, 0.22396906, 0.9332979 ], [ 0.89731023, 0.71694417, 0.11682691], [ 0.04576582, 0.89288435, 0.87985685], [ 0.57822961, 0.34463642, 0.19137506], [ 0.41551206, 0.50255891, 0.62438694], [ 0.62158645, 0.57294376, 0.39147308], [ 0.83240172, 0.41756554, 0.89859381], [ 0.408273 , 0.97774586, 0.56584299]]) Coordinates: * dim_0 (dim_0) int64 0 1 2 3 4 5 6 7 8 9 * dim_1 (dim_1) int64 0 1 2 In [7]: ds.a=10 In [8]: ds.a Out[8]: 10 In [9]: ds Out[9]: <xray.Dataset> Dimensions: (dim_0: 10, dim_1: 3) Coordinates: * dim_0 (dim_0) int64 0 1 2 3 4 5 6 7 8 9 * dim_1 (dim_1) int64 0 1 2 Data variables: a (dim_0, dim_1) float64 0.1986 0.4027 0.07676 0.5472 0.4733 ... ``` Most confusing when you set |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/714/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |