dpnp.var
- dpnp.var(x1, axis=None, dtype=None, out=None, ddof=0, keepdims=False)[source]
Compute the variance along the specified axis.
For full documentation refer to
numpy.var.Limitations
Input array is supported as
dpnp.ndarray. Size of input array is limited bya.size > 0. Prametersaxisis supported only with default valueNone. Prametersdtypeis supported only with default valueNone. Prametersoutis supported only with default valueNone. Prameterskeepdimsis supported only with default valuenumpy._NoValue. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types.See also
dpnp.stdCompute the standard deviation along the specified axis.
dpnp.meanCompute the arithmetic mean along the specified axis.
dpnp.nanmeanCompute the arithmetic mean along the specified axis, ignoring NaNs.
dpnp.nanstdCompute the standard deviation along the specified axis, while ignoring NaNs.
dpnp.nanvarCompute the variance along the specified axis, while ignoring NaNs.
Examples
>>> import dpnp as np >>> a = np.array([[1, 2], [3, 4]]) >>> np.var(a) 1.25