10000 MAINT: Remove usages of np.row_stack and np.in1d by mtsokol · Pull Request #19110 · scipy/scipy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: Remove usages of np.row_stack and np.in1d #19110

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 1 commit into from
Aug 22, 2023

Conversation

mtsokol
Copy link
Contributor
@mtsokol mtsokol commented Aug 22, 2023

Hi @ngoldbaum,

This PR addresses changes present in numpy/numpy#24445.

@@ -450,17 +450,17 @@ def _onenormest_core(A, AT, t, itmax):
if t > 1:
# (5)
# Break if the most promising t vectors have been visited already.
if np.in1d(ind[:t], ind_hist).all():
if np.isin(ind[:t], ind_hist).all():
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking through this code, ind is 1-dimentional so np.in1d should be replaceable by np.isin without .ravel().

@j-bowhay j-bowhay added the maintenance Items related to regular maintenance tasks label Aug 22, 2023
@tylerjereddy tylerjereddy added this to the 1.12.0 milestone Aug 22, 2023
Copy link
Contributor
@tylerjereddy tylerjereddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and CI is happy

@tylerjereddy tylerjereddy merged commit b57542a into scipy:main Aug 22, 2023
@mtsokol mtsokol deleted the remove-np-trapz-usage branch August 23, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0