baybe.utils.numericalΒΆ

Utilities for numeric operations.

Module Attributes

DTypeFloatNumpy

Floating point data type used for numpy arrays.

DTypeFloatTorch

Floating point data type used for torch tensors.

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.