numpy.extract(condition, arr)
Return the elements of an array that satisfy some condition.
This is equivalent to np.compress(ravel(condition), ravel(arr)). If condition is boolean np.extract is equivalent to arr[condition].
np.compress(ravel(condition), ravel(arr))
condition
np.extract
arr[condition]
Note that place does the exact opposite of extract.
place
extract
联系方式: