public mean(notnull weights as NDArray<Double>, ignoreNaN as Boolean = false, where as Boolean[] = null) as Double
Weighted arithmetic mean of every selected element.
| Parameter | Description |
|---|---|
weights | Double tensor with the same shape; weights must be finite, non-negative and have positive sum. |
ignoreNaN | Skip NaNs; otherwise propagate them. |
where | Optional flat Boolean mask, one entry per source element. |
Scalar Double.
average = data.mean(weights=weights)