summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index b7160fe05..d01430c8c 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -2842,13 +2842,13 @@ def cov(m, y=None, rowvar=True, bias=False, ddof=None, fweights=None,
dtype = np.result_type(m, y, np.float64)
X = array(m, ndmin=2, dtype=dtype)
- if rowvar == 0 and X.shape[0] != 1:
+ if not rowvar and X.shape[0] != 1:
X = X.T
if X.shape[0] == 0:
return np.array([]).reshape(0, 0)
if y is not None:
y = array(y, copy=False, ndmin=2, dtype=dtype)
- if rowvar == 0 and y.shape[0] != 1:
+ if not rowvar and y.shape[0] != 1:
y = y.T
X = np.vstack((X, y))