diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2023-03-02 18:17:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-02 18:17:19 -0500 |
commit | e57ee3fa15234827bebc2500ea89d5d05e895d2f (patch) | |
tree | daf844e97803f7bfac633c28750612b918df22da /numpy/lib/tests | |
parent | 6736bd9ad4db2b09b055820af7799a9f3d704394 (diff) | |
parent | 3dcc33aa585339f36639f78da70bb35f26609bef (diff) | |
download | numpy-e57ee3fa15234827bebc2500ea89d5d05e895d2f.tar.gz |
Merge pull request #23314 from rgommers/depr-product-and-co
DEP: deprecate `product`, `cumproduct`, `sometrue`, `alltrue`
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 8 | ||||
-rw-r--r-- | numpy/lib/tests/test_type_check.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index cc8003f61..3ec46735c 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -229,8 +229,8 @@ class TestAny: def test_nd(self): y1 = [[0, 0, 0], [0, 1, 0], [1, 1, 0]] assert_(np.any(y1)) - assert_array_equal(np.sometrue(y1, axis=0), [1, 1, 0]) - assert_array_equal(np.sometrue(y1, axis=1), [0, 1, 1]) + assert_array_equal(np.any(y1, axis=0), [1, 1, 0]) + assert_array_equal(np.any(y1, axis=1), [0, 1, 1]) class TestAll: @@ -247,8 +247,8 @@ class TestAll: def test_nd(self): y1 = [[0, 0, 1], [0, 1, 1], [1, 1, 1]] assert_(not np.all(y1)) - assert_array_equal(np.alltrue(y1, axis=0), [0, 0, 1]) - assert_array_equal(np.alltrue(y1, axis=1), [0, 0, 1]) + assert_array_equal(np.all(y1, axis=0), [0, 0, 1]) + assert_array_equal(np.all(y1, axis=1), [0, 0, 1]) class TestCopy: diff --git a/numpy/lib/tests/test_type_check.py b/numpy/lib/tests/test_type_check.py index 3f4ca6309..ea0326139 100644 --- a/numpy/lib/tests/test_type_check.py +++ b/numpy/lib/tests/test_type_check.py @@ -155,7 +155,7 @@ class TestIscomplex: def test_fail(self): z = np.array([-1, 0, 1]) res = iscomplex(z) - assert_(not np.sometrue(res, axis=0)) + assert_(not np.any(res, axis=0)) def test_pass(self): z = np.array([-1j, 1, 0]) |