brainevent.bitpack#
- brainevent.bitpack(arr, axis)[source]#
Pack a boolean array into uint32 words along the given axis.
Each uint32 word stores 32 binary values. Bit
bof wordwcorresponds to elementw * 32 + balong the packed axis.- Parameters:
arr (
Array) – Input array (any dtype; non-zero values are treated asTrue).axis (
int) – Axis along which to pack.
- Returns:
Packed uint32 array. The packed axis has length
ceil(arr.shape[axis] / 32).- Return type:
Array