cunumeric.extract#

cunumeric.extract(condition: ndarray, arr: ndarray) ndarray#

Return the elements of an array that satisfy some condition.

Parameters:
  • condition (array_like) – An array whose nonzero or True entries indicate the elements of arr to extract.

  • arr (array_like) – Input array of the same size as condition.

Returns:

result – Rank 1 array of values from arr where condition is True.

Return type:

ndarray

See also

numpy.extract

Availability:

Multiple GPUs, Multiple CPUs