annoviko / pyclustering

pyclustering is a Python, C++ data mining library.
https://pyclustering.github.io/
BSD 3-Clause "New" or "Revised" License
1.17k stars 248 forks source link

correct type error when using distance functions #686

Open ian-curtis opened 2 years ago

ian-curtis commented 2 years ago

As mentioned in issue #671, a type error is raised when using certain distance functions with numpy. Seems like it's just an issue of a list not being converted to a numpy array at some point in the process. I'm not sure if my corrections fix the problem in all instances of the code but it certainly corrects the issue for using Python and kmeans. There may be a better place to make the change but I couldn't get any other place to work. I also don't know any C++ so I didn't edit any of those (in case they need to be). Let me know if something is off :).