NumPy · Function
np.nanmean
Computes arithmetic means while ignoring NaN values. It reduces the whole input by default or works along selected axes.
Last updated
- Since
- 1.22.0 for the where parameter
Syntax
numpy.nanmean(a, axis=None, dtype=None, out=None, keepdims=<no value>, *, where=<no value>)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
numpy.meannumpy.averagenumpy.stdnumpy.varnumpy.nanstdnumpy.nanvar