summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-03-16 09:43:52 -0600
committerGitHub <noreply@github.com>2018-03-16 09:43:52 -0600
commite19e52e0934690323d666704b850dcab1f8c66bf (patch)
treeeedca96806f0c73cafa3e845475cb4f6e776210c /numpy/lib/tests/test_function_base.py
parent01cd5c9d8b8cd4cfc5c7bde066aa5ed4736ed3e9 (diff)
parent018dfbcaa69d8bcda4d909be11a65a188cf5d1dd (diff)
downloadnumpy-e19e52e0934690323d666704b850dcab1f8c66bf.tar.gz
Merge pull request #10666 from dfreese/fix/covcomplex
BUG: fix complex casting error in cov with aweights
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index 2b1ac1cc0..c28257c6d 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -1752,7 +1752,9 @@ class TestCov(object):
def test_complex(self):
x = np.array([[1, 2, 3], [1j, 2j, 3j]])
- assert_allclose(cov(x), np.array([[1., -1.j], [1.j, 1.]]))
+ res = np.array([[1., -1.j], [1.j, 1.]])
+ assert_allclose(cov(x), res)
+ assert_allclose(cov(x, aweights=np.ones(3)), res)
def test_xy(self):
x = np.array([[1, 2, 3]])