I ran it again and for
import numpy as np print(clusterAnalysis(np.array([1.7, 1.6, 1.3, 1.3, 2.8, 1.4, 2.8, 2.6, 1.6, 2.7, 1.1])))The output of the code is
[2 2 2 2 1 2 1 1 2 1 2]but it should be
[1 1 1 1 2 1 2 2 1 2 1]I dont understand it...