Back to Numerical Arrays (NumPy)
np.nanmean
Compute the arithmetic mean along the specified axis, ignoring NaNs.
Syntax
np.nanmean(a, axis?, keepdims?, dtype?)
Description
Compute the arithmetic mean along the specified axis, ignoring NaNs.
Parameters
| Name | Description |
|---|---|
| a | - Array containing numbers whose mean is desired |
| axis(optional) | - Axis or axes along which the means are computed (null = all elements) |
| keepdims(optional) | - If true, reduced axes are left with size one |
| dtype(optional) | - Type to use in computing the mean |
Returns
Promise<NDArray | number>