[SciPy-User] cobyla

Ralf Gommers ralf.gommers@gmail....
Mon Oct 1 14:58:57 CDT 2012


On Sun, Sep 30, 2012 at 11:09 PM, The Helmbolds <helmrp@yahoo.com> wrote:

> On my system (Windows 7, Python 2.7.x and IDLE, latest SciPy), I observe
> the following behavior with fmin_cobyla and minimize's COBYLA method.
>
> Case 1: When run either in the IDLE interactive shell or within an
> enclosing Python program:
>     1.1. The fmin_cobyla function never returns the Results dictionary,
> and never displays it to Python's stdout. This is true regardless of the
> function call's disp setting.
>

Correct. The fmin_cobyla docstring clearly says what it returns. Result
objects are only returned by the new interfaces in the 0.11.0 release
(minimize, minimize_scalar, root).

     1.2. The 'minimize' function always returns the Results dictionary but
> never displays it to Python's stdout. Again, this is true regardless of the
> function call's disp setting.
>

`disp` doesn't print the Results objects. For me it works as advertized (in
IPython), it prints something like:

   Normal return from subroutine COBYLA

   NFVALS =   37   F = 8.000000E-01    MAXCV = 0.000000E+00
   X = 1.400113E+00   1.700056E+00

Ralf


> Case 2: When run interactively in Window's Command Prompt box:
>     2.1 The fmin_cobyla function never returns the Result dictionary,
> regardless of the function call's disp setting. Setting disp to True or
> False either displays the Results dictionary in the command box or not
> (respectively). I don't think the Results dictionary gets to the command
> box via stdout.
>     2.2 The 'minimize' function always returns the Result dictionary,
> regardless of the function call's disp setting.  Setting disp to True or
> False either displays the Results dictionary in the command box or not
> (respectively). I don't think the Results dictionary gets to the command
> box via stdout.
>
> My thanks to all who helped clarify this situation.
>
> Bob H
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20121001/d8f76971/attachment-0001.html 


More information about the SciPy-User mailing list