pythonwrench.math module

pythonwrench.math.argmax(x: Iterable) int[source]
pythonwrench.math.argmin(x: Iterable) int[source]
pythonwrench.math.argsort(x: Iterable[T], *, key: Callable[[T], Any] | None = None, reverse: bool = False) list[int][source]
pythonwrench.math.clamp(x: T_Real, xmin: T_Real | None = None, xmax: T_Real | None = None) T_Real[source]
pythonwrench.math.clip(x: T_Real, xmin: T_Real | None = None, xmax: T_Real | None = None) T_Real[source]
pythonwrench.math.nextafter(x: float, y: float) float[source]

Equivalent to math.nextafter for python <=3.8.

pythonwrench.math.nextdown(x: float) float[source]