dpnp.tensor.extract¶
- dpnp.tensor.extract(condition, arr)[source]¶
Returns the elements of an array that satisfies the condition.
If
conditionis booleandpnp.tensor.extractis equivalent toarr[condition].Note that
dpnp.tensor.placedoes the opposite ofdpnp.tensor.extract.- Parameters:
condition (usm_ndarray) -- An array whose non-zero or
Trueentries indicate the element ofarrto extract.arr (usm_ndarray) -- Input array of the same size as
condition.
- Returns:
out -- Rank 1 array of values from
arrwhereconditionisTrue.- Return type: