Re: [SciPy-user] unexpected MLP.solve() output: bug? [scikits-openopt]
Ok, I have committed the changes. However, first of all you should see r.isFeasible==True and/or r.istop>=0. If r.isFeasible=true, r.ff was always a single number (lake it was before), if it's false - r.ff can be anything - inf, nan, float or ndarray ect. So I have made some changes and committed to svn (and updated tar.gz.file in OO install page), try now (I had no much time, so maybe this bug still remains somewhere and/or a new one have appeared) and inform if any other bugs will be encountered. Also, for more safety you could use by yourself f_opt = asfarray(r.ff).flatten()[0] Regards, D.
Dear Dmitrey,
It happens sometimes that the object returned by NLP.solve() has the .ff field of numpy.ndarray type instead of a float64 type. The array has just one element, which is the current minimum of the function, as expected.
Example: ---- p=NLP(....) r = p.solve('ralg') print type(r.ff) ---- The output is usually "float64" and sometimes "numpy.ndarray".
Since this is pretty unexpected and caused me some troubles (easily solved) could you change to one of the two behaviors (or motivate)?
Details: openopt 0.15 numpy 1.04 scipy 0.5.2 ubuntu linux x86_64
In any case, many thanks for you optimization library.
Emanuele
participants (1)
-
dmitrey