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

Function nonzero

dask/array/routines.py:2138–2143  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

2136
2137@derived_from(np)
2138def nonzero(a):
2139 ind = argwhere(a)
2140 if ind.ndim > 1:
2141 return tuple(ind[:, i] for i in range(ind.shape[1]))
2142 else:
2143 return (ind,)
2144
2145
2146def _unravel_index_kernel(indices, func_kwargs):

Callers 4

nonzeroMethod · 0.90
whereFunction · 0.70
tril_indicesFunction · 0.70
triu_indicesFunction · 0.70

Calls 1

argwhereFunction · 0.85

Tested by

no test coverage detected