(a, indices, axis=0)
| 2053 | |
| 2054 | @derived_from(np) |
| 2055 | def take(a, indices, axis=0): |
| 2056 | axis = validate_axis(axis, a.ndim) |
| 2057 | |
| 2058 | if isinstance(a, np.ndarray) and isinstance(indices, Array): |
| 2059 | return _take_dask_array_from_numpy(a, indices, axis) |
| 2060 | else: |
| 2061 | return a[(slice(None),) * axis + (indices,)] |
| 2062 | |
| 2063 | |
| 2064 | def _take_dask_array_from_numpy(a, indices, axis): |
nothing calls this directly
no test coverage detected
searching dependent graphs…