You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
Hi all,
I encountered an issue while using the
kmeans_plusplus_initializer
function in thepyclustering.cluster.center_initializer
module. The error message is as follows:The real cause of this error is in the following location of
pyclustering 0.10.1.2
:pyclustering/pyclustering/cluster/center_initializer.py
Line 234 in 5b80a67
This error occurs seems that because the
numpy.warnings
module has been removed in recent versions ofnumpy
, and thewarnings
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 replacednumpy.warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered')
withwarnings.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.
The text was updated successfully, but these errors were encountered: