pretty_format_numerical

glotaran.utils.sanitize.pretty_format_numerical(value: float | int, decimal_places: int = 1) str[source]

Format value with with at most decimal_places decimal places.

Used to format values like the t-value.

Parameters:
  • value (float | int) – Numerical value to format.

  • decimal_places (int) – Decimal places to display. Defaults to 1

Returns:

Pretty formatted version of the value.

Return type:

str