Multik 0.3.0 Help

Statistics

Overview

The mk.stat entry point provides statistical operations on ndarrays. Functions are defined in the Statistics interface.

Available functions

Function

Description

mean

Arithmetic mean of all elements, or along an axis.

median

Median value of all elements.

average

Weighted average of all elements.

For details and examples, see Descriptive Statistics.

Quick example

val a = mk.ndarray(mk[1.0, 2.0, 3.0, 4.0, 5.0]) mk.stat.mean(a) // 3.0 mk.stat.median(a) // 3.0 mk.stat.average(a) // 3.0 (uniform weights)
19 February 2026