issues: 292550002
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
292550002 | MDU6SXNzdWUyOTI1NTAwMDI= | 1864 | BUG: ds['...'].sel(...).values throws exception for a ds loaded from file | 7441788 | closed | 0 | 1 | 2018-01-29T20:31:52Z | 2018-01-30T09:19:09Z | 2018-01-30T09:19:09Z | CONTRIBUTOR | ```python import xarray as xr ds = xr.Dataset(data_vars={'foo': xr.DataArray([1.], dims='abc', coords={'abc': ['a']})}) ds.to_netcdf(path='ds.nc', engine='h5netcdf') ds1 = xr.open_dataset('ds.nc', engine='h5netcdf') ds1['foo'].values # uncomment to eliminate exceptionds1['foo'].sel(abc=['a']).values # throws "TypeError: PointSelection getitem only works with bool arrays" ``` Problem descriptionAccessing the DataArray's Expected Outputarray([ 1.]) Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1864/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |