public static operator/(notnull first as NDArray<T>, second as T) as NDArray<T>
Divides every element by a scalar without modifying the source array. The result preserves the shape and element type, including FP32 storage for Float. Like array-to-array division, integer results truncate toward zero and floating results follow IEEE 754. Signed MIN_VALUE divided by -1 wraps to MIN_VALUE, consistently with fixed-width unary negation.
| Parameter | Description |
|---|---|
first | Array to divide. |
second | Divisor of the array's element type. |
A new array with independent element storage.
import klyn.math pixels = NDArray<Float>([0f, 127.5f, 255f]) normalized = pixels / 255f # [0.0, 0.5, 1.0]