File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -352,7 +352,6 @@ dimensions:
352
352
ind_x = xr.DataArray([0 , 1 ], dims = [" x" ])
353
353
ind_y = xr.DataArray([0 , 1 ], dims = [" y" ])
354
354
da[ind_x, ind_y] # orthogonal indexing
355
- da[ind_x, ind_x] # vectorized indexing
356
355
357
356
Slices or sequences/arrays without named-dimensions are treated as if they have
358
357
the same dimension which is indexed along:
@@ -399,6 +398,12 @@ These methods may also be applied to ``Dataset`` objects
399
398
Vectorized indexing may be used to extract information from the nearest
400
399
grid cells of interest, for example, the nearest climate model grid cells
401
400
to a collection specified weather station latitudes and longitudes.
401
+ To trigger vectorized indexing behavior
402
+ you will need to provide the selection dimensions with a new
403
+ shared output dimension name. In the example below, the selections
404
+ of the closest latitude and longitude are renamed to an output
405
+ dimension named "points":
406
+
402
407
403
408
.. ipython :: python
404
409
You can’t perform that action at this time.
0 commit comments