issues: 171828347
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
171828347 | MDU6SXNzdWUxNzE4MjgzNDc= | 974 | Indexing with alignment and broadcasting | 1217238 | closed | 0 | 741199 | 6 | 2016-08-18T06:39:27Z | 2018-02-04T23:30:12Z | 2018-02-04T23:30:11Z | MEMBER | I think we can bring all of NumPy's advanced indexing to xarray in a very consistent way, with only very minor breaks in backwards compatibility. For boolean indexing:
- For vectorized indexing (by integer or index value):
- All of these methods should also work for indexing on This framework neatly subsumes most of the major limitations with xarray's existing indexing:
- Boolean indexing on multi-dimensional arrays works in an intuitive way, for both selection and assignment.
- No more need for specialized methods ( Questions to consider:
- How does this interact with @benbovy's enhancements for MultiIndex indexing? (#802 and #947)
- How do we handle mixed slice and array indexing? In NumPy, this is a major source of confusion, because slicing is done before broadcasting and the order of slices in the result is handled separately from broadcast indices. I think we may be able to resolve this by mapping slices in this case to 1D arrays along their respective axes, and using our normal broadcasting rules.
- Should we deprecate non-boolean indexing with xref these comments from @MaximilianR and myself Note: I would certainly welcome help making this happen from a contributor other than myself, though you should probably wait until I finish #964, first, which lays important groundwork. |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/974/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |