home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 783987344

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/4941#issuecomment-783987344 https://api.github.com/repos/pydata/xarray/issues/4941 783987344 MDEyOklzc3VlQ29tbWVudDc4Mzk4NzM0NA== 548266 2021-02-23T07:59:46Z 2021-02-23T09:29:14Z CONTRIBUTOR

@max-sixty Thanks :)

IIUC the existing code may break type-checking, but the code will still run on numpy<1.20; please let me know if that's not the case.

Yes the existing code which is now the fallback could be considered wrong as it does not match the definitions that numpy ships. We could consider syncing that with numpy but that seems like more trouble than its worth since no one is likely to typecheck this against the definitions of numpy functions without running numpy 1.20 or newer.

The numpy definition is:

DTypeLike = Union[ np.dtype, # default data type (float64) None, # array-scalar types and generic types type, # TODO: enumerate these when we add type hints for numpy scalars # anything with a dtype attribute "_SupportsDType[np.dtype[Any]]", # character codes, type strings or comma-separated fields, e.g., 'float64' str, _VoidDTypeLike, ]

So one could add None and type but should probably omit the rest in order to not replicate too much of numpys internal type definitions

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  813246980
Powered by Datasette · Queries took 3.443ms · About: xarray-datasette