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

Function digitize

dask/array/routines.py:795–798  ·  view source on GitHub ↗
(a, bins, right=False)

Source from the content-addressed store, hash-verified

793
794@derived_from(np)
795def digitize(a, bins, right=False):
796 bins = asarray_safe(bins, like=meta_from_array(a))
797 dtype = np.digitize(asarray_safe([0], like=bins), bins, right=False).dtype
798 return a.map_blocks(np.digitize, dtype=dtype, bins=bins, right=right)
799
800
801def _searchsorted_block(x, y, side):

Callers

nothing calls this directly

Calls 3

asarray_safeFunction · 0.90
meta_from_arrayFunction · 0.90
map_blocksMethod · 0.45

Tested by

no test coverage detected