Module utils

Module utils 

Source
Expand description

Utility functions for next-plaid

Functionsยง

create_mask
Create a boolean mask from sequence lengths.
normalize_rows
Normalize rows of a 2D array to unit length.
packbits
Pack bits into bytes (big-endian).
pad_sequences
Pad sequences to uniform length.
quantile
Compute the k-th quantile of a 1D array using linear interpolation.
quantiles
Compute multiple quantiles efficiently.
row_norms
Compute L2 norm of each row.
unpackbits
Unpack bytes into bits (big-endian).