Skip to content

Cannot handle negative numbers? #11

@afzalmushtaque

Description

@afzalmushtaque

'$'+ballpark.business(100000)

Out[23]: '$100K'

'$'+ballpark.business(-100000)

Traceback (most recent call last):
File "C:\Python\Python36\lib\site-packages\IPython\core\interactiveshell.py", line 2963, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
'$'+ballpark.business(-100000)
File "C:\Python\Python36\lib\site-packages\ballpark\utils.py", line 90, in unwrapped_function
results = fn(values, *vargs, **kwargs)
File "C:\Python\Python36\lib\site-packages\ballpark\notation.py", line 130, in business
exponent = order(reference)
File "C:\Python\Python36\lib\site-packages\ballpark\notation.py", line 18, in order
power = log(repel(value), base)
ValueError: math domain error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions