diff options
author | jason king <pizza@netspace.net.au> | 2015-10-05 17:05:20 +1100 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-12-18 11:18:07 -0700 |
commit | 42ba464096da39bc267fd8cdfbcc4089c90f6686 (patch) | |
tree | 61f01702796bddfbeb0a7f41713cdb3aa2b620c4 /numpy/lib/function_base.py | |
parent | 3af5f0574740611076df9dc905330defab70a6dc (diff) | |
download | numpy-42ba464096da39bc267fd8cdfbcc4089c90f6686.tar.gz |
DOC, MAINT: Fix the numpy.ma.cov signature and documentation.
The rowvar and bias parameters are booleans, not integers.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 541ad079c..8335b4fdb 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -2097,7 +2097,8 @@ class vectorize(object): return _res -def cov(m, y=None, rowvar=1, bias=0, ddof=None, fweights=None, aweights=None): +def cov(m, y=None, rowvar=True, bias=False, ddof=None, fweights=None, + aweights=None): """ Estimate a covariance matrix, given data and weights. @@ -2118,14 +2119,14 @@ def cov(m, y=None, rowvar=1, bias=0, ddof=None, fweights=None, aweights=None): y : array_like, optional An additional set of variables and observations. `y` has the same form as that of `m`. - rowvar : int, optional - If `rowvar` is non-zero (default), then each row represents a + rowvar : bool, optional + If `rowvar` is True (default), then each row represents a variable, with observations in the columns. Otherwise, the relationship is transposed: each column represents a variable, while the rows contain observations. - bias : int, optional - Default normalization is by ``(N - 1)``, where ``N`` corresponds to the - number of observations given (unbiased estimate). If `bias` is 1, then + bias : bool, optional + Default normalization (False) is by ``(N - 1)``, where ``N`` is the + number of observations given (unbiased estimate). If `bias` is True, then normalization is by ``N``. These values can be overridden by using the keyword ``ddof`` in numpy versions >= 1.5. ddof : int, optional |