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

change restrt to restart; deprecate restrt #398

Merged
merged 3 commits into from
Oct 31, 2023
Merged

change restrt to restart; deprecate restrt #398

merged 3 commits into from
Oct 31, 2023

Conversation

lukeolson
Copy link
Member

@lukeolson lukeolson commented Oct 26, 2023

restrt is deprecated in SciPy 1.10.0: https://docs.scipy.org/doc/scipy/release/1.10.0-notes.html

This follows the approach in scipy/scipy#16392

Fixes #395

@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2023

Codecov Report

Merging #398 (844cbdb) into main (e00bf8e) will decrease coverage by 0.16%.
The diff coverage is 20.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             main     #398      +/-   ##
==========================================
- Coverage   82.39%   82.23%   -0.16%     
==========================================
  Files          83       83              
  Lines       12454    12479      +25     
  Branches     1884     1892       +8     
==========================================
+ Hits        10261    10262       +1     
- Misses       1606     1626      +20     
- Partials      587      591       +4     
Files Coverage Δ
pyamg/krylov/tests/test_krylov.py 100.00% <ø> (ø)
pyamg/krylov/tests/test_scipy.py 100.00% <ø> (ø)
pyamg/relaxation/smoothing.py 67.86% <100.00%> (ø)
pyamg/krylov/_gmres.py 40.00% <30.00%> (-22.50%) ⬇️
pyamg/krylov/_gmres_householder.py 74.60% <18.18%> (-3.74%) ⬇️
pyamg/krylov/_gmres_mgs.py 69.91% <18.18%> (-3.59%) ⬇️
pyamg/krylov/_fgmres.py 72.35% <0.00%> (-3.72%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@lukeolson lukeolson requested review from bensworth and jbschroder and removed request for bensworth October 26, 2023 21:30
@@ -108,6 +110,15 @@ def fgmres(A, b, x0=None, tol=1e-5,
http://www-users.cs.umn.edu/~saad/books.html

"""
if restrt is None:
restrt = restart
Copy link
Member

Choose a reason for hiding this comment

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

can this be a pass, and not restrt = restart ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch; I think it should be flipped.

restrt = restart
elif restart is not None:
raise ValueError('Only use restart, not restrt (deprecated).')
else:
Copy link
Member

Choose a reason for hiding this comment

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

should we also set restart=restrt here in the final else?

If so, then we'd probably need to change this also in all the else statements in the other routines, too

@@ -108,6 +110,14 @@ def fgmres(A, b, x0=None, tol=1e-5,
http://www-users.cs.umn.edu/~saad/books.html

"""
Copy link
Member

Choose a reason for hiding this comment

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

Yes, I think this looks good

@lukeolson lukeolson merged commit fb27c0d into main Oct 31, 2023
26 checks passed
@lukeolson lukeolson deleted the restrt-fix branch November 1, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deprecate restrt and replace with restart
3 participants