Skip to content

Commit fd3eb21

Browse files
authored
Clearer Vectorized Indexing example (#4433)
* Clearer Vectorized Indexing example * Feedback from @alexamici
1 parent 902f1fc commit fd3eb21

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/indexing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ MATLAB, or after using the :py:func:`numpy.ix_` helper:
339339
coords={"x": [0, 1, 2], "y": ["a", "b", "c", "d"]},
340340
)
341341
da
342-
da[[0, 1], [1, 1]]
342+
da[[0, 2, 2], [1, 3]]
343343
344344
For more flexibility, you can supply :py:meth:`~xarray.DataArray` objects
345345
as indexers.

doc/whats-new.rst

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ Documentation
9999
By `Sander van Rijn <https://github.com/sjvrijn>`_
100100
- Update the contributing guide to use merges instead of rebasing and state
101101
that we squash-merge. (:pull:`4355`) By `Justus Magin <https://github.com/keewis>`_.
102+
- Updated Vectorized Indexing to a clearer example.
103+
By `Maximilian Roos <https://github.com/max-sixty>`_
102104

103105
Internal Changes
104106
~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)