issues: 1170989744
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1170989744 | I_kwDOAMm_X85Fy-Kw | 6367 | unhashable type: 'numpy.ndarray' if 'units' attribute is numpy array in NetCDF file | 212077 | closed | 0 | 0 | 2022-03-16T12:59:25Z | 2022-03-18T21:18:51Z | 2022-03-18T21:18:51Z | CONTRIBUTOR | What happened?Calling
Causes error "unhashable type: 'numpy.ndarray'" https://github.com/pydata/xarray/blob/95bb9ae4233c16639682a532c14b26a3ea2728f3/xarray/coding/times.py#L698, because attrs['units'] is a numpy.ndarray. What did you expect to happen?I guess another check could be added to ignore the attribute if its value is unhashable Minimal Complete Verifiable ExampleNo response Relevant log outputNo response Anything else we need to know?No response Environmentxr.show_versions() INSTALLED VERSIONS commit: None python: 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 22:01:29) [MSC v.1900 64 bit (AMD64)] python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 85 Stepping 4, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: (None, None) libhdf5: 1.10.6 libnetcdf: 4.7.4 xarray: 0.19.0 pandas: 1.3.2 numpy: 1.21.5 scipy: 1.6.0 netCDF4: 1.5.6 pydap: None h5netcdf: 0.11.0 h5py: 3.2.1 Nio: None zarr: None cftime: 1.5.2 nc_time_axis: None PseudoNetCDF: None rasterio: 1.1.7 cfgrib: None iris: None bottleneck: None dask: None distributed: None matplotlib: 3.5.1 cartopy: 0.18.0 seaborn: None numbagg: None pint: None setuptools: 59.8.0 pip: 21.0.1 conda: None pytest: 6.2.5 IPython: None sphinx: 4.1.0 |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/6367/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |