public mean(notnull weights as NDArray<Double>, axis as Long, keepDims as Boolean = false, ignoreNaN as Boolean = false, where as Boolean[] = null, result as NDArray<Double> = null) as NDArray<Double>
Weighted mean along axes; weights may be source-shaped or a flat reduced-slice vector.
| Parameter | Description |
|---|---|
weights | Finite non-negative Double weights. |
axis | Selection of axes (axis accepts a single index). |
keepDims | Keep reduced dimensions with length one. |
result | Optional non-aliased, shape-compatible destination reused without allocation. |
ignoreNaN | Skip NaNs; otherwise propagate them. |
where | Optional flat Boolean mask, one entry per source element. |
Reduced Double tensor.
average = data.mean(weights, axis=1)