pull_requests: 1098978950
This data as json
id | node_id | number | state | locked | title | user | body | created_at | updated_at | closed_at | merged_at | merge_commit_sha | assignee | milestone | draft | head | base | author_association | auto_merge | repo | url | merged_by |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1098978950 | PR_kwDOAMm_X85BgRaG | 7214 | closed | 0 | Pass indexes directly to the DataArray and Dataset constructors | 4160723 | <!-- Feel free to remove check-list items aren't relevant to your change --> - [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](https://github.com/pydata/xarray/blob/e678a1d7884a3c24dba22d41b2eef5d7fe5258e7/xarray/core/indexes.py#L1030) 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)` | 2022-10-25T14:16:44Z | 2023-08-30T09:11:56Z | 2023-07-18T11:52:11Z | b3a3fd5a537d8000baf8ece3093a60ea14406ecc | 1 | ddd505e6af5270e143ee814485d5b4665456d77f | 6e77f5e8942206b3e0ab08c3621ade1499d8235b | MEMBER | 13221727 | https://github.com/pydata/xarray/pull/7214 |
Links from other tables
- 1 row from pull_requests_id in labels_pull_requests