cunumeric.where#

cunumeric.where(condition[, x, y])#

Return elements chosen from x or y depending on condition.

Parameters
  • condition (array_like, bool) – Where True, yield x, otherwise yield y.

  • x (array_like) – Values from which to choose. x, y and condition need to be broadcastable to some shape.

  • y (array_like) – Values from which to choose. x, y and condition need to be broadcastable to some shape.

Returns

out – An array with elements from x where condition is True, and elements from y elsewhere.

Return type

ndarray

See also

numpy.where

Availability

Multiple GPUs, Multiple CPUs