-1

I have 4 numpy array and I want to know at each index which one is bigger.(all of the data are numbers)

arm1_data=dataset[:,34]
arm2_data=dataset[:,35]
arm3_data=dataset[:,36]
arm4_data=dataset[:,37]

what should I do? (I saw this question but it doesn't work for me)

1 Answers1

0

you could use np.argmax instead:

idx = np.argmax(dataset[:, 34:38], axis=1)

this would give you an index per row, with 0 being 34, 1 being 35, ...

Ayoub ZAROU
  • 2,387
  • 6
  • 20