diff options
author | mattip <matti.picus@gmail.com> | 2023-02-07 11:55:34 +0200 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2023-02-07 11:55:34 +0200 |
commit | f79325e70e1a79e1fdda9edfcdebd78048e67d2c (patch) | |
tree | d794f9aa1be15286f868069ab811d0c6facc7d08 /numpy | |
parent | 163d3c533d37fa76727ecdee429446ad41aac7f2 (diff) | |
download | numpy-f79325e70e1a79e1fdda9edfcdebd78048e67d2c.tar.gz |
TST: add test (from review)
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/tests/test_ufunc.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/core/tests/test_ufunc.py b/numpy/core/tests/test_ufunc.py index f31482666..88668c81b 100644 --- a/numpy/core/tests/test_ufunc.py +++ b/numpy/core/tests/test_ufunc.py @@ -2023,6 +2023,13 @@ class TestUfunc: assert w_at[0].category == w_loop[0].category assert str(w_at[0].message)[:10] == str(w_loop[0].message)[:10] + def test_ufunc_at_ellipsis(self): + # Make sure the indexed loop check does not choke on iters + # with subspaces + arr = np.zeros(5) + np.add.at(arr, slice(None), np.ones(5)) + assert_array_equal(arr, np.ones(5)) + def test_cast_index_fastpath(self): arr = np.zeros(10) values = np.ones(100000) |