(a, indices, axis=0)
| 2005 | |
| 2006 | @derived_from(np) |
| 2007 | def 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 | |
| 2016 | def _take_dask_array_from_numpy(a, indices, axis): |
nothing calls this directly
no test coverage detected