mindspore.Tensor.bitwise_not

Tensor.bitwise_not() Tensor[source]

Returns bitwise not of self.

Warning

This is an experimental API that is subject to change or deletion.

Returns:

Tensor, has the same shape and type as self.

Raises:
Supported Platforms:

Ascend

Examples

>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor
>>> input = Tensor(np.array([True, False, True, False]))
>>> output = input.bitwise_not()
>>> print(output)
[False True False True]