# tensorplay.functional.logical_not Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.logical_not.html ```python tensorplay.functional.logical_not(input, *, out=None) → Tensor ``` Computes the element-wise logical NOT of the given input tensor. If not specified, the output tensor will have the bool dtype. If the input tensor is not a bool tensor, zeros are treated as False and non-zeros are treated as True. Parameters: input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input tensor. Keyword Arguments: out ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor), optional) – the output tensor. Example: ``` >>> tensorplay.logical_not(tensorplay.tensor([True, False])) tensor([False, True]) >>> tensorplay.logical_not(tensorplay.tensor([0, 1, -10], dtype=tensorplay.int8)) tensor([ True, False, False]) >>> tensorplay.logical_not(tensorplay.tensor([0., 1.5, -10.], dtype=tensorplay.double)) tensor([ True, False, False]) >>> tensorplay.logical_not(tensorplay.tensor([0., 1., -10.], dtype=tensorplay.double), out=tensorplay.empty(3, dtype=tensorplay.int16)) tensor([1, 0, 0], dtype=tensorplay.int16) ```