DIDSR / QuCAD

Creative Commons Zero v1.0 Universal
3 stars 7 forks source link

float input Deprecated for math.factorial #1

Open jasonfan1997 opened 1 year ago

jasonfan1997 commented 1 year ago

Hi @ElimThompsonFDA , I tried running the example script on my python environment and https://github.com/DIDSR/QuCAD/blob/main/scripts/tools/calculator.py#L137 threw me a type error.

From, https://docs.python.org/3/library/math.html#math.factorial

It seems math.factorial float input support is deprecated in Python 3.9 and above. I think the easiest way to handle it is to change all math.factorial to numpy.math.factorial since numpy is required and imported here anyway.

ElimThompsonFDA commented 1 year ago

Pushed the change for scripts/tools/calculator.py. Thanks for letting me know!