From 762a8d4ba33531eff1a0a1544eae5c4660cfd5cf Mon Sep 17 00:00:00 2001 From: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Date: Tue, 25 Apr 2023 17:17:41 +0100 Subject: [PATCH] handle inf (#4888) --- openbb_terminal/helper_funcs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openbb_terminal/helper_funcs.py b/openbb_terminal/helper_funcs.py index faa1bbf6c31..cd845ad0b20 100644 --- a/openbb_terminal/helper_funcs.py +++ b/openbb_terminal/helper_funcs.py @@ -821,6 +821,9 @@ def us_market_holidays(years) -> list: def lambda_long_number_format(num, round_decimal=3) -> Union[str, int, float]: """Format a long number.""" + if num == float("inf"): + return "inf" + if isinstance(num, float): magnitude = 0 while abs(num) >= 1000: