You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to find the indices of the value 9. In this case, that is 0, 1, 0.
In Numpy, I would stack that array with a 2x2x2 meshgrid, giving the row and column of each element. Then, if I find the maximum element in arr[:,:,0], I just need to look at arr[:,:,1::] to get the row and column indices.
Thanks
Jack
The text was updated successfully, but these errors were encountered:
Hi there,
How can I find the INDICES of the max value in an array?
E.g., if my array looks like this:
I would like to find the indices of the value 9. In this case, that is
0, 1, 0
.In Numpy, I would stack that array with a 2x2x2 meshgrid, giving the row and column of each element. Then, if I find the maximum element in arr[:,:,0], I just need to look at arr[:,:,1::] to get the row and column indices.
Thanks
Jack
The text was updated successfully, but these errors were encountered: