bitwise_and
Compute the bit-wise AND of two arrays element-wise.
Returns:
NDArray — Element-wise bit-wise AND of x1 and x2.
bitwise_or
Compute the bit-wise OR of two arrays element-wise.
Returns:
NDArray — Element-wise bit-wise OR of x1 and x2.
bitwise_xor
Compute the bit-wise XOR of two arrays element-wise.
Returns:
NDArray — Element-wise bit-wise XOR of x1 and x2.
bitwise_not
Compute the bit-wise NOT of an array element-wise (one’s complement).Also available as
bitwise_invert, which is an alias for bitwise_not.
Returns:
NDArray — Element-wise bit-wise NOT (inversion) of x.
invert
Compute the bit-wise inversion (NOT) of an array element-wise. This is identical tobitwise_not.
Returns:
NDArray — Element-wise bit-wise inversion of x.
left_shift
Shift the bits of an integer to the left. Bits are shifted to the left by appendingx2 zeros at the right of x1.
Also available as
bitwise_left_shift, which is an alias for left_shift.
Returns:
NDArray — x1 with bits shifted x2 positions to the left.
right_shift
Shift the bits of an integer to the right.Also available as
bitwise_right_shift, which is an alias for right_shift.
Returns:
NDArray — x1 with bits shifted x2 positions to the right.
packbits
Pack the elements of a binary-valued array into bits in a uint8 array.
Returns:
NDArray — Array of type uint8 whose elements represent packed bits.
unpackbits
Unpack elements of a uint8 array into a binary-valued array.
Returns:
NDArray — Array of uint8 values (0s and 1s) representing the unpacked bits.
bitwise_count
Count the number of 1-bits (popcount) in each element of the array.
Returns:
NDArray — Array where each element contains the number of set bits (1-bits) of the corresponding element in x.