# cupy.packbits¶

cupy.packbits(myarray)[source]

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

This function currently does not support axis option.

Parameters: myarray (cupy.ndarray) – Input array. The packed array. cupy.ndarray

Note

When the input array is empty, this function returns a copy of it, i.e., the type of the output array is not necessarily always uint8. This exactly follows the NumPy’s behaviour (as of version 1.11), alghough this is inconsistent to the documentation.