baybe.utils.conversion.fraction_to_float

baybe.utils.conversion.fraction_to_float(value: str | float | Fraction, /)[source]

Convert the provided input representing a fraction into a float.

Parameters:

value (str | float | Fraction) – The input to be converted.

Return type:

float

Returns:

The float representation of the given input.

Raises:

ValueError – If the input was provided as string but could not be interpreted as fraction.