8000 BUG: Make np.nonzero threading safe by charris · Pull Request #28385 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Make np.nonzero threading safe #28385

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 14 commits into from
Feb 23, 2025
Prev Previous commit
Next Next commit
lint
  • Loading branch information
eendebakpt authored and charris committed Feb 23, 2025
commit f5069056a336572611794fe1dd6e748f1d35c528
2 changes: 1 addition & 1 deletion numpy/_core/tests/test_multithreading.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def test_nonzero():
# In a second pass the indices of the non-zero elements are determined, but they can have changed

for dtype in [bool, int, float]:
x= np.random.randint(4, size=10_000).astype(dtype)
x = np.random.randint(4, size=10_000).astype(dtype)

def func(seed):
x[::2] = np.random.randint(2)
Expand Down
0