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

Function digitize

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

Source from the content-addressed store, hash-verified

795
796@derived_from(np)
797def digitize(a, bins, right=False):
798 bins = asarray_safe(bins, like=meta_from_array(a))
799 dtype = np.digitize(asarray_safe([0], like=bins), bins, right=False).dtype
800 return a.map_blocks(np.digitize, dtype=dtype, bins=bins, right=right)
801
802
803def _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