- cupy.packbits(a, axis=None, bitorder='big')[source]#
Packs the elements of a binary-valued array into bits in a uint8 array.
This function currently does not support
a (cupy.ndarray) – Input array.
axis (int, optional) – Not supported yet.
bitorder (str, optional) – bit order to use when packing the array, allowed values are ‘little’ and ‘big’. Defaults to ‘big’.
The packed array.
- Return type
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.