Calculates the
mean
value of the given array.
Mean: The "average" number; found by adding all data points and dividing by the number of data points.
Syntax
import { mean } from '@opentf/std';
mean(
arr: number[] = [],
cb?: (v: number, index: number) => number
): number
Examples
mean([]) //=> NaN
mean([1]) //=> 1
mean([4, 1, 7]) //=> 4
mean([4, 2, 8]) //=> 4.67