pull_requests: 1746740437
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1746740437 | PR_kwDOAMm_X85oHSTV | 8790 | closed | 0 | Expand use of `.oindex` and `.vindex` | 13301940 | this is a follow-up to previous PRs (#8780 and #8750), continuing the efforts outlined in the [plan for decoupling lazy indexing functionality from NamedArray](https://github.com/pydata/xarray/blob/main/design_notes/named_array_design_doc.md#plan-for-decoupling-lazy-indexing-functionality-from-namedarray). the primary focus of this PR is the removal of vectorized and orthogonal indexing logic from the `__getitem__` method. Now, `__getitem__` exclusively handles basic indexers, aligning with points 3 and 4 of the plan: - as per point 3, lazy indexing arrays will now implement `__getitem__` solely for basic indexing. For orthogonal indexing, .oindex will be used, and for vectorized indexing, .vindex will be utilized. - following point 4, IndexingAdapter classes have been updated to consistently implement `__getitem__`, `.oindex`, and `.vindex` <!-- Feel free to remove check-list items aren't relevant to your change --> - [ ] Closes #xxxx - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` | 2024-02-28T00:47:00Z | 2024-03-15T23:28:23Z | 2024-03-15T05:00:04Z | 2024-03-15T05:00:03Z | c9d3084e98d38a7a9488380789a8d0acfde3256f | 0 | ba9f386be22d4f9e435720554df0904e6217a023 | b0e504e423399c75e990923032bc417c2759eafd | MEMBER | { "enabled_by": { "login": "dcherian", "id": 2448579, "node_id": "MDQ6VXNlcjI0NDg1Nzk=", "avatar_url": "https://avatars.githubusercontent.com/u/2448579?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dcherian", "html_url": "https://github.com/dcherian", "followers_url": "https://api.github.com/users/dcherian/followers", "following_url": "https://api.github.com/users/dcherian/following{/other_user}", "gists_url": "https://api.github.com/users/dcherian/gists{/gist_id}", "starred_url": "https://api.github.com/users/dcherian/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dcherian/subscriptions", "organizations_url": "https://api.github.com/users/dcherian/orgs", "repos_url": "https://api.github.com/users/dcherian/repos", "events_url": "https://api.github.com/users/dcherian/events{/privacy}", "received_events_url": "https://api.github.com/users/dcherian/received_events", "type": "User", "site_admin": false }, "merge_method": "squash", "commit_title": "Expand use of `.oindex` and `.vindex` (#8790)", "commit_message": "* refactor __getitem__() by removing vectorized and orthogonal indexing logic from it\r\n\r\n* implement explicit routing of vectorized and outer indexers\r\n\r\n* Add VectorizedIndexer and OuterIndexer to ScipyArrayWrapper's __getitem__ method\r\n\r\n* Refactor indexing in LazilyIndexedArray and LazilyVectorizedIndexedArray\r\n\r\n* Add vindex and oindex methods to StackedBytesArray\r\n\r\n* handle explicitlyindexed arrays\r\n\r\n* Refactor LazilyIndexedArray and LazilyVectorizedIndexedArray classes\r\n\r\n* Remove TODO comments in indexing.py\r\n\r\n* use indexing.explicit_indexing_adapter() in scipy backend\r\n\r\n* update docstring\r\n\r\n* fix docstring\r\n\r\n* Add _oindex_get and _vindex_get methods to NativeEndiannessArray and BoolTypeArray\r\n\r\n* Update indexing support in ScipyArrayWrapper\r\n\r\n* Update xarray/tests/test_indexing.py\r\n\r\nCo-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>\r\n\r\n* Fix assert statement in test_decompose_indexers\r\n\r\n* add comments to clarifying why the else branch is needed\r\n\r\n* Add _oindex_get and _vindex_get methods to _ElementwiseFunctionArray\r\n\r\n* update whats-new\r\n\r\n* Refactor apply_indexer function in indexing.py and variable.py for code reuse\r\n\r\n* cleanup\r\n\r\n---------\r\n\r\nCo-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>\r\nCo-authored-by: Deepak Cherian <deepak@cherian.net>" } |
13221727 | https://github.com/pydata/xarray/pull/8790 |
Links from other tables
- 0 rows from pull_requests_id in labels_pull_requests