returnn.util.math

Some mathematical functions, in pure NumPy.

returnn.util.math.next_power_of_two(n: int) int[source]

next power of two, >= n

class returnn.util.math.PiecewiseLinear(values: Dict[int | float, int | float])[source]

Piecewise linear function.