numpy.unpackbits()

numpy.unpackbits

numpy.unpackbits(myarray, axis=None)

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

Each element of myarray represents a bit-field that should be unpacked into a binary-valued output array. The shape of the output array is either 1-D (if axis is None) or the same shape as the input array with unpacking done along the axis specified.

Parameters:

myarray : ndarray, uint8 type

Input array.

axis : int, optional

Unpacks along this axis.

Returns:

登录查看完整内容