I am getting this while training the mnist in knn model:
ValueError Traceback (most recent call last)
in ()
----> 1 pred=knn(x_train,y_train,x_test,1)
in knn(X, Y, queryPoint, k)
11
12
—> 13 vals = sorted(vals)
14 # Nearest/First K points
15 vals = vals[:k]
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()