handle inf (#4888)

This commit is contained in:
montezdesousa
2023-04-25 17:17:41 +01:00
committed by GitHub
parent 7f28d012cf
commit 762a8d4ba3

View File

@@ -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: