home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1116686433

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/6142#issuecomment-1116686433 https://api.github.com/repos/pydata/xarray/issues/6142 1116686433 IC_kwDOAMm_X85Cj0hh 43316012 2022-05-03T21:39:07Z 2022-05-03T21:39:07Z COLLABORATOR

I was just looking through the code a bit and I must say that the usage of dimension arguments is far from harmonized in the code.... Apart from arguments randomly being called dim or dims, there are so many inconsistencies that I even wonder if it is possible to use anything but strings in "production".

  • some parts of the code claim that hashable is allowed but then check explicitly for str else tuple(dims) which would straight up fail with a custom hashable class.
  • Some parts do the exact opposite, they check for iterable and not str first.

At least internally most objects use tuple[Hashable, ...] for dims.

The lazy shortcut to allow a single str is making this more complicated than one might think (but I have to admit, I use it all the time).

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