numpy.ma.cov(x, y=None, rowvar=True, bias=False, allow_masked=True, ddof=None)
[source]
Estimate the covariance matrix.
Except for the handling of missing data this function does the same as numpy.cov
. For more details and examples, see numpy.cov
.
By default, masked values are recognized as such. If x
and y
have the same shape, a common mask is allocated: if x[i,j]
is masked, then y[i,j]
will also be masked. Setting allow_masked
to False will raise an exception if values are missing in either of the input arrays.
Parameters: |
x : array_like A 1-D or 2-D array containing multiple variables and observations. Each row of y : array_like, optional An additional set of variables and observations. rowvar : bool, optional If bias : bool, optional Default normalization (False) is by allow_masked : bool, optional If True, masked values are propagated pair-wise: if a value is masked in ddof : {None, int}, optional If not New in version 1.5. |
---|---|
Raises: |
ValueError Raised if some values are missing and |
See also
© 2008–2017 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.12.0/reference/generated/numpy.ma.cov.html