home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 646130205

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
646130205 MDU6SXNzdWU2NDYxMzAyMDU= 4185 Keep single-value coordinates as dimensions 3801015 closed 0     3 2020-06-26T09:20:23Z 2022-04-18T03:49:25Z 2022-04-18T03:49:25Z CONTRIBUTOR      

Why Currently, operations like .sel, .isel, .unstack (and many others) will choose to have a non-dimension coordinate when an index would have just a single value in it. For .sel and .isel you can avoid this by selecting a single element list, but .unstack this becomes a problem. However, given that these methods have a drop argument, and .squeeze(drop=True) exists to get rid of a dimension, I tend not to ever want the behaviour of the non-dimension coordinate - it no longer aligns on this coordinate when using operators, and to all effects behaves like that coordinate is not there, only remembering it for concat.

Suggested feature A global option (settable via xr.set_options(...)) to enforce that any length 1 coordinate is always kept as a dimension.

Ideally I'd like it so that this were the default behaviour, but I imagine the back-compatability problems that would generate would make it too unlikely a feature, but having a global option to change to this behaviour would be good enough.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4185/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 400.704ms · About: xarray-datasette