MCPcopy Index your code
hub / github.com/pydata/xarray / _iter_over_selections

Function _iter_over_selections

xarray/computation/apply_ufunc.py:559–571  ·  view source on GitHub ↗

Iterate over selections of an xarray object in the provided order.

(obj, dim, values)

Source from the content-addressed store, hash-verified

557
558
559def _iter_over_selections(obj, dim, values):
560 """Iterate over selections of an xarray object in the provided order."""
561 from xarray.core.groupby import _dummy_copy
562
563 dummy = None
564 for value in values:
565 try:
566 obj_sel = obj.sel(**{dim: value})
567 except (KeyError, IndexError):
568 if dummy is None:
569 dummy = _dummy_copy(obj)
570 obj_sel = dummy
571 yield obj_sel
572
573
574def apply_groupby_func(func, *args):

Callers 1

apply_groupby_funcFunction · 0.85

Calls 2

_dummy_copyFunction · 0.90
selMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…