I have a "distances" numpy array. I want to find the index of an element. I used numpy.where condition but it is not returning the index. Instead, it is just returning the type of the element with an empty array, like so:
(array([], dtype=int64),)
What should I do to get the index of the element? Please help. Thanks.
This is my code:
distances = distances_query_training(features_train, features_test[2])
print min(distances)
print type(distances)
pos = np.where(distances == 0.03471681)
print pos
And the following is the output:
0.0347168063061
(array([], dtype=int64),)