my code is :
km = KMeans(n_clusters=2, init='k-means++', max_iter=100, n_init=1,verbose=0)
predict=[]
the result is :[array([0,0,1,1,0])]
predict.append(km.fit_predict(matrix))
then I want to zip this result by list of string the result of zip is a list with one member because it assume*[array([0,0,1,1,0])]* as a list that has one member.
what should I do?
The function is returning a list with one array in it. So, you should be able to zip it with:
zip(list_of_strings, result[0])