二元运算

元素位操作

bitwise_and \(x1,x2,)/[, out, where, ...] )

计算两个数组的位和元素。

bitwise_or \(x1,x2,)/[, out, where, casting, ...] )

按位或按元素计算两个数组的位。

bitwise_xor \(x1,x2,)/[, out, where, ...] )

计算两个数组元素的逐位异或。

invert (x,) [, out, where, casting, order, ...] )

计算位逆,或位逆,元素逆。

left_shift \(x1,x2,)/[, out, where, casting, ...] )

将整数的位向左移动。

right_shift \(x1,x2,)/[, out, where, ...] )

将整数的位右移。

钻头填塞

packbits (a) [, axis, bitorder] )

将二进制值数组的元素打包成uint8数组中的位。

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

将uint8数组的元素解包到二进制值输出数组中。

输出格式

binary_repr (num) [, width] )

以字符串形式返回输入数字的二进制表示形式。