Skip to content

min

builtin · libnexusinterp/corefcn/max-proprietary.cc

: m = min (x)
: m = min (x, [], dim)
: m = min (x, [], vecdim)
: m = min (x, [], "all")
: [m, i] = min (…)
: m = min (x, y)
: … = min (…, "omitnan")
: … = min (…, "includenan")

Return the smallest elements.

With one array argument the minimum is taken along the first dimension that is not of length one. The dimension (or a vector of dimensions, or "all") can be chosen with the third argument, after an empty second argument. The second output holds the position of the first occurrence of the minimum in each slice.

With two array arguments the smaller of each pair of elements is returned; the arguments may differ in size when one can be expanded to the other.

NaN values are skipped unless "includenan" is given, in which case any NaN makes the result NaN. Complex values are compared by magnitude and then by phase angle.