summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorBrandon Carter <bcarter@mit.edu>2016-12-19 13:47:44 -0500
committerBrandon Carter <bcarter@mit.edu>2016-12-19 13:47:44 -0500
commit3fda48c4ab78f984e0a4bb5e6556052e90583b86 (patch)
treeb09bf0f3691afdfc3a3b2c187054907e4678c17c /numpy/lib/function_base.py
parent8fb4d0c4b687b514416c280c5c738469e67854b2 (diff)
downloadnumpy-3fda48c4ab78f984e0a4bb5e6556052e90583b86.tar.gz
change int check to bool check for rowvar in cov
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))