home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 643014353

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/4144#issuecomment-643014353 https://api.github.com/repos/pydata/xarray/issues/4144 643014353 MDEyOklzc3VlQ29tbWVudDY0MzAxNDM1Mw== 1386642 2020-06-12T01:27:55Z 2020-06-12T01:33:41Z CONTRIBUTOR

@mathause On further consideration, I think it might not be possible to get this to work. This method has three behaviors: - Mapping -> Dataset - Hashable -> DataArray - else (List): -> Dataset

With my limited understanding of mypy, I think that any two of these is supported by overload, but I'm not sure it's possible to support all 3. I tried several different options, but maybe I am missing something.

Would a good middle ground be something like this? - Hashable -> DataArray - Any -> Union[DataArray, Dataset]

I think this would work since both the input/outputs of the first one are subtypes of the second one. It's not a complete solution, but it would solve the most common problem of ds['a'] returning a union type rather than a DataArray.

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