MCPcopy
hub / github.com/pydata/xarray / _select_along_axis

Function _select_along_axis

xarray/core/nputils.py:42–45  ·  view source on GitHub ↗
(values, idx, axis)

Source from the content-addressed store, hash-verified

40
41
42def _select_along_axis(values, idx, axis):
43 other_ind = np.ix_(*[np.arange(s) for s in idx.shape])
44 sl = other_ind[:axis] + (idx,) + other_ind[axis:]
45 return values[sl]
46
47
48def nanfirst(values, axis, keepdims=False):

Callers 2

nanfirstFunction · 0.85
nanlastFunction · 0.85

Calls 1

arangeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…