home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 859678312

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/issues/4821#issuecomment-859678312 https://api.github.com/repos/pydata/xarray/issues/4821 859678312 MDEyOklzc3VlQ29tbWVudDg1OTY3ODMxMg== 37740986 2021-06-11T15:56:22Z 2021-06-11T15:56:22Z CONTRIBUTOR

You seemed to all agree on the solution 1:

Explicitly allow tuples as dimension and variable names. This is probably the most mypy-compatible, since we use Hashable in lots of places

If you allow explicitly tuple, doesn't it mean I need to edit this part (as mentioned by @mathause) : if not isinstance(variables, (list, tuple)): variables = [variables] (I tried and it works well)

But you said after :

If it's a tuple, that message can suggest passing it as a list.

(I find it a little bit weird to give dimensions in list, no ? I thought that generally tuples were more adapted to provide dims)

Can you tell me which test-case I can implement to fulfill all the requirements needed ? I can't think of test cases that I can implement except the one suggested first, and that one passes with the first modification

Also the code you mentioned is for one dim, but in this case we can have a list of dims, it does means that I need to do a 'for loop' for checking the existence of the dims, right ?

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