baybe.utils.numericalΒΆ

Utilities for numeric operations.

Module Attributes

VARNAME_NUMPY_USE_SINGLE_PRECISION

Environment variable name for enforcing single precision in numpy.

DTypeFloatNumpy

Floating point data type used for numpy arrays.

DTypeFloatONNX

Floating point data type used for ONNX models.

Functions

closer_element(x, y, target)

Determine which of two given inputs is closer to a target value.

closest_element(array, target)

Find the element of an array that is closest to a target value.

geom_mean(arr, weights)

Calculate the (weighted) geometric mean along the second axis of a 2-D array.