diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2013-10-24 23:26:16 +0200 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2013-10-24 23:26:16 +0200 |
commit | 3a01f4e11874be9db17fb24fa17c649fd45a8aff (patch) | |
tree | 70b08d11745dd0ffbb6bd92e155eb271656182c5 /numpy | |
parent | ef511149ebeb5e53059b75b1305d0405744b3d8a (diff) | |
download | numpy-3a01f4e11874be9db17fb24fa17c649fd45a8aff.tar.gz |
TST: Initialize some arrays to to avoid valgrind warnings
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/tests/test_multiarray.py | 2 | ||||
-rw-r--r-- | numpy/linalg/tests/test_linalg.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py index 9f333a4a2..9d191da35 100644 --- a/numpy/core/tests/test_multiarray.py +++ b/numpy/core/tests/test_multiarray.py @@ -1624,7 +1624,7 @@ class TestBinop(object): # Check behavior against both bare ndarray objects and a # ndarray subclasses with and without their own override - obj = cls((1,)) + obj = cls((1,), buffer=np.ones(1,)) arr_objs = [np.array([1]), np.array([2]).view(OtherNdarraySubclass), diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py index d40157904..cc1404bf1 100644 --- a/numpy/linalg/tests/test_linalg.py +++ b/numpy/linalg/tests/test_linalg.py @@ -616,7 +616,7 @@ class TestLstsq(LinalgTestCase, LinalgNonsquareTestCase): expect_resids.shape = (1,) assert_equal(residuals.shape, expect_resids.shape) else: - expect_resids = type(x)([]) + expect_resids = np.array([]).view(type(x)) assert_almost_equal(residuals, expect_resids) assert_(np.issubdtype(residuals.dtype, np.floating)) assert_(imply(isinstance(b, matrix), isinstance(x, matrix))) |