mirror of
https://github.com/actions/setup-python.git
synced 2024-11-26 19:05:21 +01:00
22 lines
422 B
JavaScript
22 lines
422 B
JavaScript
var baseMean = require('./_baseMean'),
|
|
identity = require('./identity');
|
|
|
|
/**
|
|
* Computes the mean of the values in `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @returns {number} Returns the mean.
|
|
* @example
|
|
*
|
|
* _.mean([4, 2, 8, 6]);
|
|
* // => 5
|
|
*/
|
|
function mean(array) {
|
|
return baseMean(array, identity);
|
|
}
|
|
|
|
module.exports = mean;
|