issues: 1085619598
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1085619598 | I_kwDOAMm_X85AtT2O | 6091 | uint type data are read as wrong type (float64) | 30388627 | closed | 0 | 3 | 2021-12-21T09:29:10Z | 2022-01-09T03:30:55Z | 2022-01-09T03:30:55Z | NONE | What happened: The Minimal Complete Verifiable Example: ```python import xarray as xr print(xr.open_dataset('test_save.nc')['processing_quality_flags'].dtype) ``` Anything else we need to know?: The sample data is attached here.
The output of Note that I can't reproduce it using this example: ``` import numpy as np import xarray as xr da = xr.DataArray(np.array([1,2,3], dtype='uint')).rename('test_array') da.to_netcdf("test.nc", engine='netcdf4') with xr.open_dataset('test.nc') as ds: print(ds['test_array'].dtype)
Environment: Output of <tt>xr.show_versions()</tt>INSTALLED VERSIONS ------------------ commit: None python: 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:20:46) [GCC 9.4.0] python-bits: 64 OS: Linux OS-release: 5.11.0-40-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: ('en_US', 'UTF-8') libhdf5: 1.12.1 libnetcdf: 4.8.1 xarray: 0.20.1 pandas: 1.3.4 numpy: 1.20.3 scipy: 1.7.3 netCDF4: 1.5.8 pydap: None h5netcdf: None h5py: 3.6.0 Nio: None zarr: 2.10.3 cftime: 1.5.1.1 nc_time_axis: None PseudoNetCDF: None rasterio: 1.2.10 cfgrib: None iris: None bottleneck: None dask: 2021.11.2 distributed: 2021.11.2 matplotlib: 3.5.0 cartopy: 0.20.1 seaborn: None numbagg: None fsspec: 2021.11.1 cupy: None pint: 0.18 sparse: None setuptools: 59.4.0 pip: 21.3.1 conda: 4.11.0 pytest: None IPython: 7.30.0 sphinx: None |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/6091/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |