pow2ceil

sofia_redux.scan.utilities.numba_functions.pow2ceil(x)[source]

Return 2 to the power of ceil(log_2(x)).

Finds where 2^(n - 1) <= x < 2^n and returns 2^n.

Parameters:
xint or float
Returns:
int