nnAudio.utils.nextpow2

nnAudio.utils.nextpow2(A)

A helper function to calculate the next nearest number to the power of 2.

Parameters

A (float) – A float number that is going to be rounded up to the nearest power of 2

Returns

The nearest power of 2 to the input number A

Return type

int

Examples

>>> nextpow2(6)
3