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 event array of any boolean, integer or floating-point dtype. Elements are packed by activity:True(boolean) or non-zero (numeric; negative values and NaN are active).axis (
int) – Axis along which to pack.
- Returns:
Packed uint32 array. The packed axis has length
ceil(arr.shape[axis] / 32).- Return type:
Array