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
. Prametersaxis
is supported only with default valueNone
. Prametersdtype
is supported only with default valueNone
. Prametersout
is supported only with default valueNone
. Prameterskeepdims
is 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.std
Compute the standard deviation along the specified axis.
dpnp.mean
Compute the arithmetic mean along the specified axis.
dpnp.nanmean
Compute the arithmetic mean along the specified axis, ignoring NaNs.
dpnp.nanstd
Compute the standard deviation along the specified axis, while ignoring NaNs.
dpnp.nanvar
Compute 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