npstreams.mean(arrays, axis=-1, ignore_nan=False)

Mean of a stream of arrays. This function consumes the entire stream.

  • arrays (iterable of ndarrays) – Arrays to be averaged. This iterable can also a generator.

  • axis (int, optional) – Reduction axis. Default is to average the arrays in the stream as if they had been stacked along a new axis, then average along this new axis. If None, arrays are flattened before averaging. If axis is an int larger that the number of dimensions in the arrays of the stream, arrays are averaged along the new axis.

  • ignore_nan (bool, optional) – If True, NaNs are set to zero weight. Default is propagation of NaNs.


mean – Total mean array.

Return type

~numpy.ndarray, dtype float