MCPcopy
hub / github.com/dask/dask / _take_dask_array_from_numpy

Function _take_dask_array_from_numpy

dask/array/routines.py:2064–2070  ·  view source on GitHub ↗
(a, indices, axis)

Source from the content-addressed store, hash-verified

2062
2063
2064def _take_dask_array_from_numpy(a, indices, axis):
2065 assert isinstance(a, np.ndarray)
2066 assert isinstance(indices, Array)
2067
2068 return indices.map_blocks(
2069 lambda block: np.take(a, block, axis), chunks=indices.chunks, dtype=a.dtype
2070 )
2071
2072
2073@derived_from(np)

Callers 1

takeFunction · 0.85

Calls 2

takeMethod · 0.80
map_blocksMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…