home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 1422543378

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
1422543378 PR_kwDOAMm_X85BgRaG 7214 Pass indexes directly to the DataArray and Dataset constructors 4160723 closed 0     17 2022-10-25T14:16:44Z 2023-08-30T09:11:56Z 2023-07-18T11:52:11Z MEMBER   1 pydata/xarray/pulls/7214
  • [x] Closes #6392
  • [x] Closes #6633 ?
  • [ ] Tests added
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst

From https://github.com/pydata/xarray/issues/6392#issuecomment-1290454937:

I'm thinking of only accepting one or more instances of Indexes as indexes argument in the Dataset and DataArray constructors. The only exception is when fastpath=True a mapping can be given directly. Also, when an empty collection of indexes is passed this skips the creation of default pandas indexes for dimension coordinates.

  • It is much easier to handle: just check that keys returned by Indexes.variables do no conflict with the coordinate names in the coords argument
  • It is slightly safer: it requires the user to explicitly create an Indexes object, thus with less chance to accidentally provide coordinate variables and index objects that do not relate to each other (we could probably add some safe guards in the Indexes class itself)
  • It is more convenient: an Xarray Index may provide a factory method that returns an instance of Indexes that we just need to pass as indexes, and we could also do something like ds = xr.Dataset(indexes=other_ds.xindexes)
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7214/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

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