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

Function extract

dask/array/routines.py:2000–2003  ·  view source on GitHub ↗
(condition, arr)

Source from the content-addressed store, hash-verified

1998
1999@derived_from(np)
2000def extract(condition, arr):
2001 condition = asarray(condition).astype(bool)
2002 arr = asarray(arr)
2003 return compress(condition.ravel(), arr.ravel())
2004
2005
2006@derived_from(np)

Callers

nothing calls this directly

Calls 4

asarrayFunction · 0.90
compressFunction · 0.85
astypeMethod · 0.45
ravelMethod · 0.45

Tested by

no test coverage detected