Skip to content
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

ENH: use inplace add in _minimize_newtoncg #19266

Merged
merged 1 commit into from Sep 23, 2023

Conversation

lorentzenchr
Copy link
Contributor

Reference issue

None in scipy, same in spirit as scikit-learn/scikit-learn#27417.

What does this implement/fix?

Use iadd x += y instead of x = x + y which saves array creation in several places.

Additional information

@j-bowhay j-bowhay added enhancement A new feature or improvement scipy.optimize labels Sep 19, 2023
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @lorentzenchr

@rgommers rgommers added this to the 1.12.0 milestone Sep 23, 2023
@rgommers rgommers merged commit e1b17e6 into scipy:main Sep 23, 2023
22 of 24 checks passed
@lorentzenchr lorentzenchr deleted the newton_cg_inplace branch September 24, 2023 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or improvement scipy.optimize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants