Computing accuracy - Argmax across prediction array

Hi, I couldn’t understand what are we trying to do with the armax step for computing accuracy. In my understanding, for 1 test example, we should get 1 prediction output, and we should compare it to the true labels. Why do we need armax step?

please ignore, i understood it via programming assignment.