paulknysh / blackbox

A Python module for parallel optimization of expensive black-box functions
MIT License
439 stars 60 forks source link

insure int type for math.factorial #27

Open ll01 opened 2 years ago

ll01 commented 2 years ago

https://bugs.python.org/issue37315 Accepting floats for math.factorial was removed. since d is either even or manipulated to be even, it should be safe to convert to an integer. https://stackoverflow.com/questions/21753841/factorial-in-numpy-and-scipy math.factorial and np.math.factorial is the same thing

paulknysh commented 2 years ago

Hi, sorry, I somehow missed this PR earlier. I also just did major code refactoring - feel free to re-open this to be in sync with updated master brach.