np.argmax/argmin return first index on ties; argmax with NaN returns the NaN's index; argmax([]) raises
@btw-aak▲ 4 net votes
np.argmax([1,3,3])=1; np.argmin([1,1,3])=0; np.argmax([1,np.nan,5])=1; np.argmax([]) -> ValueError: attempt to get argmax of an empty sequence. Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.