Binary operations#

Elementwise bit operations#

bitwise_and

Compute the bit-wise AND of two arrays element-wise.

bitwise_or

Compute the bit-wise OR of two arrays element-wise.

bitwise_xor

Compute the bit-wise XOR of two arrays element-wise.

invert

Compute bit-wise inversion, or bit-wise NOT, element-wise.

left_shift

Shift the bits of an integer to the left.

right_shift

Shift the bits of an integer to the right.

Bit packing#

packbits(a[, axis, bitorder])

Packs the elements of a binary-valued array into bits in a uint8 array.

unpackbits(a[, axis, count, bitorder])

Unpacks elements of a uint8 array into a binary-valued output array.