-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
Setting ncluster to greater than 2 (tried with 3 & 4) gives the following error:
IndexError: arrays used as indices must be of integer (or boolean) type.
Following is the full dump:
Time: 0.0
Traceback (most recent call last):
File "d:/apps/PythonRobotics-master/Mapping/kmeans_clustering/kmeans_clustering.py", line 179, in
main()
File "d:/apps/PythonRobotics-master/Mapping/kmeans_clustering/kmeans_clustering.py", line 161, in main
clusters = kmeans_clustering(rx, ry, ncluster)
File "d:/apps/PythonRobotics-master/Mapping/kmeans_clustering/kmeans_clustering.py", line 41, in kmeans_clustering
clusters = calc_centroid(clusters)
File "d:/apps/PythonRobotics-master/Mapping/kmeans_clustering/kmeans_clustering.py", line 54, in calc_centroid
x, y = calc_labeled_points(ic, clusters)
File "d:/apps/PythonRobotics-master/Mapping/kmeans_clustering/kmeans_clustering.py", line 88, in calc_labeled_points
x = tx[inds]
IndexError: arrays used as indices must be of integer (or boolean) type
Also, I still got two clusters even if ncluster was set to 1.