-
Notifications
You must be signed in to change notification settings - Fork 262
Description
Hi all,
I encountered an issue while using the kmeans_plusplus_initializer function in the pyclustering.cluster.center_initializer module. The error message is as follows:
AttributeError: module 'numpy' has no attribute 'warnings'The real cause of this error is in the following location of pyclustering 0.10.1.2:
| numpy.warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered') |
This error occurs seems that because the numpy.warnings module has been removed in recent versions of numpy, and the warnings module from Python's standard library should be used instead.
I was able to resolve this issue by modifying the source code in center_initializer.py. I replaced numpy.warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered') with warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered').
If this is indeed an issue, I would be happy to submit a PR to fix this bug. Please let me know if you would like me to proceed with this.