8000 ENH: create and use indexed inner loops by mattip · Pull Request #23136 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: create and use indexed inner loops #23136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Feb 7, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TST: add test (from review)
  • Loading branch information
mattip committed Feb 7, 2023
commit f79325e70e1a79e1fdda9edfcdebd78048e67d2c
7 changes: 7 additions & 0 deletions numpy/core/tests/test_ufunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,13 @@ def test_ufunc_at_inner_loops(self, typecode, ufunc):
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)
Expand Down
0