Multik 0.3.0 Help

minimum

Compares two arrays element by element and returns a new array where each element is the smaller of the two corresponding values. Both arrays must have the same shape.

Signature

fun <T : Number, D : Dimension> MultiArray<T, D>.minimum( other: MultiArray<T, D> ): NDArray<T, D>

Parameters

Parameter

Type

Description

other

MultiArray<T, D>

Array to compare against. Same shape required.

Returns: NDArray<T, D> — each element is min(this[i], other[i]).

Example

val a = mk.ndarray(mk[3, 1, 4]) val b = mk.ndarray(mk[1, 5, 2]) a.minimum(b) // [1, 1, 2]

Pitfalls

  • Complex types (ComplexFloat, ComplexDouble) throw UnsupportedOperationException.

28 February 2026