matrix mean

For filters.

Compute the mean of all elements in a matrix.

Command Type

built-in

Signature

> matrix mean {flags}

Input/output types:

input output
matrix float

Examples

Compute the mean of a 2x2 matrix

> [[1 2] [3 4]] | into matrix | matrix mean
2.5

Compute the mean of an identity matrix

> matrix identity 2 | matrix mean
0.5

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.