There are lots of solutions to do this for a single array, but what about a matrix, such as:
>>> k
array([[ 35, 48, 63],
[ 60, 77, 96],
[ 91, 112, 135]])
You can use k.max()
, but of course this only returns the highest value, 135
. What if I want the second or third?