dpnp.average
- dpnp.average(x1, axis=None, weights=None, returned=False)[source]
Compute the weighted average along the specified axis.
For full documentation refer to
numpy.average.Limitations
Input array is supported as
dpnp.ndarray. Prametersaxisis supported only with default valueNone. Prametersweightsis supported only with default valueNone. Prametersreturnedis supported only with default valueFalse. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types.See also
dpnp.meanCompute the arithmetic mean along the specified axis.
Examples
>>> import dpnp as np >>> data = np.arange(1, 5) >>> [i for i in data] [1, 2, 3, 4] >>> np.average(data) 2.5