I have an array that represents poker cards held by players. Each player holds 6 cards and the cards have a value of 1-12 and have a corresponding suit of 1-4.
The f
Are you sorting the values only to see wich one has the highest value?? Because in this case why not use np.max()?:
deck=np.array([[[ 6., 2.],
[ 10., 1.],
[ 5., 1.],
[ 9., 2.],
[ 4., 1.],
[ 3., 2.],
[ 11., 2.]],
[[ 7., 2.],
[ 8., 1.],
[ 1., 1.],
[ 9., 2.],
[ 4., 1.],
[ 3., 2.],
[ 12., 2.]]])
np.max(deck)
Out[4]: 12.0
np.max(deck[0])
Out[5]: 11.0