garydoranjr / pyemd

Accurate, efficient Earth Mover's Distance for Python (and MATLAB).
BSD 3-Clause "New" or "Revised" License
162 stars 31 forks source link

Port to Python 3 & NumPy API 1.7 #7

Open gasteigerjo opened 5 years ago

gasteigerjo commented 5 years ago

This pull request ports the package to Python 3 and NumPy API 1.7. It therefore solves issue #3.

I've also increased EPSILON a bit to reduce problems caused by catastrophic elimination in line 95 of emd.c.

gasteigerjo commented 5 years ago

I've closed this for now since the package seems to deadlock sometimes and I need to debug this first.

gasteigerjo commented 5 years ago

Okay, the problem was due to me calling the function with a Numpy-array of dtype float32. I've added checks to prevent such issues in the future.