Bitwise AND (BitwiseAnd)#

API#

class warp_nn.modules.operators.BitwiseAnd[source]#

Bases: Module

Bitwise AND (BitwiseAnd) operation.

This class computes the element-wise bitwise AND of two integer arrays:

\[\text{BitwiseAnd}(a, b) = a \mathbin{\&} b\]

Integer operations are not differentiable, so the output arrays never require gradients.

__call__(
a: array,
b: array,
) → array[source]#

Forward pass of the operation.

Parameters:
  • a – The first input array, with up to 3 dimensions.

  • b – The second input array, with the same shape and data type as a.

Returns:

The output array, with same shape as the input arrays.

Raises:
  • ValueError – If the input arrays’ shapes differ.

  • TypeError – If the input arrays’ data types differ, or if their data type or number of dimensions is not supported.