mindspore.ops.logical_not
- mindspore.ops.logical_not(input)[source]
Compute the "logical NOT" of the input tensor element-wise.
- Parameters
input (Tensor) – The input tensor.
- Returns
Tensor
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> x = mindspore.tensor([True, False, True], mindspore.bool_) >>> output = mindspore.ops.logical_not(x) >>> print(output) [False True False]