logical_and

dragon.vm.torch.logical_and(
  input,
  other,
  out=None
)[source]

Compute the element-wise AND logical operation.

\[\text{out} = \text{input} \mathbin{\&} \text{other} \]

Examples:

a = torch.tensor([False, True, False, True])
b = torch.tensor([False, True, True, False])
c = torch.Tensor([0, 1, 0, 2])
d = torch.Tensor([0, 3, 4, 0])
print(torch.logical_and(a, b))  # [False, True, False, False]
print(torch.logical_and(c, d))  # [False, True, False, False]
Parameters:
Returns:

dragon.vm.torch.Tensor – The output tensor.