pretty_format_numerical#
- pretty_format_numerical(value: float | int, decimal_places: int = 1) str[source]#
Format value with with at most
decimal_placesdecimal places.Used to format values like the t-value.
TODO : remove after raise pyglotaran dependency to 0.7.0 Forward port of glotaran/pyglotaran#1192
- 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