dpctl.tensor.extract¶
- dpctl.tensor.extract(condition, arr)[source]¶
Returns the elements of an array that satisfies the condition.
If
conditionis booleandpctl.tensor.extractis equivalent toarr[condition].Note that
dpctl.tensor.placedoes the opposite ofdpctl.tensor.extract.- Parameters:
conditions (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:
Rank 1 array of values from
arrwhereconditionisTrue.- Return type: