# tensorplay.functional.logical_or Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.logical_or.html ```python tensorplay.functional.logical_or(input, other, *, out=None) → Tensor ``` Computes the element-wise logical OR of the given input tensors. Zeros are treated as False and nonzeros are treated as True. Parameters: - input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input tensor. - other ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the tensor to compute OR with Keyword Arguments: out ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor), optional) – the output tensor. Example: ``` >>> tensorplay.logical_or(tensorplay.tensor([True, False, True]), tensorplay.tensor([True, False, False])) tensor([ True, False, True]) >>> a = tensorplay.tensor([0, 1, 10, 0], dtype=tensorplay.int8) >>> b = tensorplay.tensor([4, 0, 1, 0], dtype=tensorplay.int8) >>> tensorplay.logical_or(a, b) tensor([ True, True, True, False]) >>> tensorplay.logical_or(a.double(), b.double()) tensor([ True, True, True, False]) >>> tensorplay.logical_or(a.double(), b) tensor([ True, True, True, False]) >>> tensorplay.logical_or(a, b, out=tensorplay.empty(4, dtype=tensorplay.bool)) tensor([ True, True, True, False]) ```