[SciPy-Dev] SciPy-Dev Digest, Vol 135, Issue 2
Matt Newville
newville at cars.uchicago.edu
Thu Jan 8 14:34:27 EST 2015
Hi Andrew,
leastsq() can be halted by having your objective function return None. I
think that doesn't work for the scalar minimizers, though I didn't try them
all.
Returning None from the objective function is not very fine-grained (you
wouldn't know why it happened), but it seems easier to have the wrappers
around the Fortran code look for a NULL return value than for a HaltError
exception. It seems like a sensible, if crude, way to say "Stop now", and
might be worth considering for all the minimizing functions.
--Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20150108/c35e97c1/attachment.html>
More information about the SciPy-Dev
mailing list