MCPcopy Create free account
hub / github.com/dask/dask / take

Function take

dask/array/routines.py:2007–2013  ·  view source on GitHub ↗
(a, indices, axis=0)

Source from the content-addressed store, hash-verified

2005
2006@derived_from(np)
2007def take(a, indices, axis=0):
2008 axis = validate_axis(axis, a.ndim)
2009
2010 if isinstance(a, np.ndarray) and isinstance(indices, Array):
2011 return _take_dask_array_from_numpy(a, indices, axis)
2012 else:
2013 return a[(slice(None),) * axis + (indices,)]
2014
2015
2016def _take_dask_array_from_numpy(a, indices, axis):

Callers

nothing calls this directly

Calls 2

validate_axisFunction · 0.90

Tested by

no test coverage detected