Skip to content

Conversation

pv
Copy link
Member

@pv pv commented Jun 22, 2019

Previously, specifying a callback argument to gmres would change the
meaning of maxiter. This is clearly undesired.

Deprecate the old 'legacy' behavior by adding a new callback_type
argument. Code that does not specify it will get a warning emitted, but
will retain the old behavior.

In #1255 it is claimed maxiter did not work without the iter_num stuff ---
however, I believe this is false: the iter_num is incremented only when
callback is given. So if maxiter did not work, this would always manifest
when callback was not provided. However, there are no bug reports of this
happening, nor can I reproduce it.

Closes: #8815
Closes: #1255

@rgommers rgommers added the maintenance Items related to regular maintenance tasks label Jun 22, 2019
@rgommers rgommers added this to the 1.4.0 milestone Jun 22, 2019
@rgommers
Copy link
Member

thanks @pv, adding callback_type and the default change for the keyword in 2.0 makes sense to me

@pv pv force-pushed the fix-gmres-callback branch from 4e9b4c8 to 57e5c90 Compare June 29, 2019 14:27
pv added 2 commits July 2, 2019 14:27
…f maxiter

Previously, specifying a `callback` argument to gmres would change the
meaning of `maxiter`. This is clearly undesired.

Deprecate the old 'legacy' behavior by adding a new `callback_type`
argument. Code that does not specify it will get a warning emitted, but
will retain the old behavior.

The 'x' callback type will not be called on inner iterations: the
optimal residual vector is not yet computed at that point. The behavior
of lgmres, gcrotmk is the same.
@pv pv force-pushed the fix-gmres-callback branch from 57e5c90 to 6513af7 Compare July 2, 2019 11:27
@rgommers rgommers merged commit 4a71ecf into scipy:master Jul 8, 2019
@rgommers
Copy link
Member

rgommers commented Jul 8, 2019

No further comments, so merged. Thanks @pv

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 scipy.sparse.linalg
Projects
None yet
2 participants