mindspore.Tensor.where

Tensor.where(condition, y) → Tensor

For details, please refer to mindspore.ops.where().