issues: 289972054
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
289972054 | MDU6SXNzdWUyODk5NzIwNTQ= | 1842 | DataArray read from netcdf with unexpected type | 167802 | closed | 0 | 1 | 2018-01-19T13:15:11Z | 2018-01-23T20:15:29Z | 2018-01-23T20:15:29Z | CONTRIBUTOR | Code Sample, a copy-pastable example if possible```python import numpy as np import h5netcdf filename = "mask_and_scale_float32.nc" with h5netcdf.File(filename, 'w') as f: f.dimensions = {'x': 5} v = f.create_variable('hello', ('x',), dtype=np.uint16) v[:] = np.ones(5, dtype=np.uint16) v[0] = np.uint16(65535) v.attrs['_FillValue'] = np.uint16(65535) v.attrs['scale_factor'] = np.float32(2) v.attrs['add_offset'] = np.float32(0.5) import xarray as xr v = xr.open_dataset(filename, mask_and_scale=True)['hello'] print(v.dtype) ``` Problem descriptionThe Expected Outputfloat32 Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1842/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |