tahamajs's picture
download
raw
379 Bytes
import "../math/number";
d3.mean = function(array, f) {
var s = 0,
n = array.length,
a,
i = -1,
j = n;
if (arguments.length === 1) {
while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j;
} else {
while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j;
}
if (j) return s / j;
};

Xet Storage Details

Size:
379 Bytes
·
Xet hash:
a6fd99378931e214dbb9825a11e63cebd4fd1996fd2c5c3c27a5592cd5246295

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.