Name
argmax, argmin
Synopsis
argmax(a
,axis
=-1) argmin(a
,axis
=-1)
argmax
returns a new integer array
m
whose shape tuple is
a
.shape
minus the
indicated axis
. Each element of
m
is the index of a maximal element of
a
along axis
.
argmin
is similar, but indicates minimal elements
rather than maximal ones.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.