home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 864596645

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/5365#issuecomment-864596645 https://api.github.com/repos/pydata/xarray/issues/5365 864596645 MDEyOklzc3VlQ29tbWVudDg2NDU5NjY0NQ== 14371165 2021-06-20T18:52:16Z 2021-06-20T18:52:16Z MEMBER

Integers don't work with Numbers: xarray/core/computation.py:1576: error: Dict entry 0 has incompatible type "Hashable": "int"; expected "Hashable": "Union[None, Number, str, Tuple[Number, ...]]" [dict-item] xarray/core/computation.py:1576: error: Dict entry 0 has incompatible type "Hashable": "int"; expected "Hashable": "Union[None, Number, Tuple[Number, ...]]" [dict-item] xarray/core/computation.py:1536: error: Dict entry 0 has incompatible type "Hashable": "int"; expected "Hashable": "Union[None, Number, str, Tuple[Number, ...]]" [dict-item]

Floats don't work with Numbers: xarray/core/computation.py:1536: error: Dict entry 0 has incompatible type "Hashable": "int"; expected "Hashable": "Union[None, Number, str, Tuple[Number, ...]]" [dict-item] xarray/core/computation.py:1578: error: Dict entry 0 has incompatible type "Hashable": "float"; expected "Hashable": "Union[None, Number, str, Tuple[Number, ...]]" [dict-item] xarray/core/computation.py:1578: error: Dict entry 0 has incompatible type "Hashable": "float"; expected "Hashable": "Union[None, Number, Tuple[Number, ...]]" [dict-item] This seems related to: https://github.com/python/mypy/issues/3186

I do wonder why we allow any type of numbers in the chunks? When does it ever make sense to input 1.5 or a complex number? https://github.com/pydata/xarray/blob/28d3349bbe8c9881448bba45785c1013b006d6f9/xarray/core/dataarray.py#L1041

It will always be forced to integers anyway: https://github.com/dask/dask/blob/8aea537d925b794a94f828d35211a5da05ad9dce/dask/array/core.py#L2815 So why not force integers to begin with?

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