mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-30 22:11:55 +00:00
handle inf (#4888)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user