home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 864218801

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-864218801 https://api.github.com/repos/pydata/xarray/issues/5365 864218801 MDEyOklzc3VlQ29tbWVudDg2NDIxODgwMQ== 5635139 2021-06-18T18:53:08Z 2021-06-18T18:53:40Z MEMBER

Sorry, I've been away for a bit.

Hmmm, I'm not sure. One is simple:

diff diff --git a/xarray/core/computation.py b/xarray/core/computation.py index af2c37db..5a839c19 100644 --- a/xarray/core/computation.py +++ b/xarray/core/computation.py @@ -1400,7 +1400,7 @@ def _get_valid_values(da, other): def cross( a: "T_DSorDAorVar", b: "T_DSorDAorVar", - dim: str, + dim: Hashable, ) -> "T_DSorDAorVar": """ Return the cross product of two (arrays of) vectors.

But that leaves lots of others! I'll have to come back to this, or if others have ideas, gratefully received. Some quick thoughts of mediocre helpfulness:

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]

I don't get how Hashable: int isn't compatible with Hashable: Number??

xarray/core/computation.py:1533: error: Argument "sample_dims" to "to_stacked_array" of "Dataset" has incompatible type "Mapping[Hashable, int]"; expected "Mapping[Hashable, Sequence[Hashable]]" [arg-type]

Does this refer to Dataset.dims and DataArray.dims having different types, and that we may want to use sizes or coerce the .dims to a list?

xarray/core/computation.py:1570: error: "Variable" has no attribute "reindex_like" [attr-defined]

Is this legit — does it work with Variables?

xarray/core/computation.py:1532: error: No overload variant of "__setitem__" of "list" matches argument types "int", "DataArray" [call-overload] xarray/core/computation.py:1532: note: Possible overload variants: xarray/core/computation.py:1532: note: def __setitem__(self, int, Dataset) -> None xarray/core/computation.py:1532: note: def __setitem__(self, slice, Iterable[Dataset]) -> None xarray/core/computation.py:1532: error: Incompatible types in assignment (expression has type "DataArray", variable has type "Dataset") [assignment]

I'm not even sure where are these variants are? Is it referring to the Dataset.__setitem__? Surely that accepts DataArrays?


...and ironically these show up in the simpler area of the code rather than the complicated part that allows for passing 2 or 3 sized dims!

Found 7 errors in 1 file (checked 142 source files)

{
    "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.618ms · About: xarray-datasette