home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

2 rows where state = "closed" and user = 212077 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date), closed_at (date)

type 2

  • issue 1
  • pull 1

state 1

  • closed · 2 ✖

repo 1

  • xarray 2
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
1171069302 PR_kwDOAMm_X840iQxK 6368 #6367 Fix for time units checking could produce "unhashable type" error okhoma 212077 closed 0     2 2022-03-16T14:02:56Z 2022-03-18T21:21:20Z 2022-03-18T21:18:52Z CONTRIBUTOR   0 pydata/xarray/pulls/6368
  • [x] Closes #6367
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6368/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1170989744 I_kwDOAMm_X85Fy-Kw 6367 unhashable type: 'numpy.ndarray' if 'units' attribute is numpy array in NetCDF file okhoma 212077 closed 0     0 2022-03-16T12:59:25Z 2022-03-18T21:18:51Z 2022-03-18T21:18:51Z CONTRIBUTOR      

What happened?

Calling load_dataset() for a file with variable with the 'units' attribute being numpy.ndarray as following:

py {'paramId': array([3015], dtype=int64), 'typeOfLevel': 'heightAboveGround', 'gridType': 'regular_ll', 'bottomLevel': array([2], dtype=int64), 'cfVarName': 'tmax', 'missingValue': array([9999], dtype=int64), 'name': 'Maximum temperature', 'scaledValueOfFirstFixedSurface': array([2], dtype=int64), 'scaledValueOfSecondFixedSurface': array([0], dtype=int64), 'shortName': 'tmax', 'topLevel': array([2], dtype=int64), 'units': array(['˚C'], dtype=object), 'max': array(['47.22 ˚C'], dtype=object), 'min': array(['-59.20 ˚C'], dtype=object), 'comment': 'Daily max'}

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 Example

No response

Relevant log output

No response

Anything else we need to know?

No response

Environment

xr.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 xarray 13221727 issue

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 22.045ms · About: xarray-datasette