0

I've a 2 dimensional numpy array (Classification Model's probability output). Now I want to extract the index of top 3 values for each nested array.

E.g.

x = np.array([[1, 2, 3, 5, 6, 8], [4, 5, 6, 9, 10, 1]], np.int32)

What I want is

[[5, 4, 3]
[4, 3, 2]]

Without using loop

Aditya Thakkar
  • 57
  • 1
  • 10

0 Answers0