[SciPy-dev] could anyone check nlp_3.py from updated scikits.openopt?

Dave dave.hirschfeld@gmail....
Mon Mar 10 07:24:33 CDT 2008


dmitrey <dmitrey.kroshko <at> scipy.org> writes:

> 
> Dave, could you update openopt from svn, run [sudo] python setup.py 
> install and run nlp_3.py once again?
> (I made some changes so the bug will be described more precisely)
> Also, what's your Python version?
> Regards, D.

System Info:

> > Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
> > IPython 0.8.2.svn.r2848 -- An enhanced Interactive Python.
> > In [2]: import numpy; numpy.__version__
> > Out[2]: '1.0.3.1'
> >
> > In [3]: import scipy; scipy.__version__
> > Out[3]: '0.7.0.dev3498'
> >
> > In [4]: from scikits import openopt; openopt.__version__
> > Out[4]: '0.15' (rev. 897)


In [4]: run -i nlp_3.py
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

C:\src\openopt\scikits\openopt\examples\nlp_3.py in <module>()
     37         p.debug = 1
     38
---> 39     r = p.solve(solver)
     40     results[solver] = (r.ff, p.getMaxResidual(r.xf), r.elapsed['solver_t
ime'], r.elapsed['solver_cputime'], r.evals['f'], r.evals['c'], r.evals['h'])
     41     subplot(2,1,1)

c:\python25\lib\site-packages\scikits\openopt\Kernel\BaseProblem.py in solve(sel
f, solvers, *args, **kwargs)
    229
    230     def solve(self, solvers, *args, **kwargs):
--> 231         return runProbSolver(self, solvers, *args, **kwargs)
    232
    233     def auxFunc(self, x, *args, **kwargs):

c:\python25\lib\site-packages\scikits\openopt\Kernel\runProbSolver.py in runProb
Solver(p_, solver_str, *args, **kwargs)
     20
     21     if p.debug:
---> 22         solverClass = getattr(__import__(solver_str), solver_str)
     23     else:
     24         try:

c:\python25\lib\site-packages\scikits\openopt\solvers\UkrOpt\ralg.py in <module>
()
----> 1
      2
      3 from numpy import diag, ones, inf, any, copy, zeros, dot, where, all, ti
le, sum, nan, isfinite,  float128,  float64
      4 from numpy.linalg import norm
      5 from BaseAlg import *
      6 from setDefaultIterFuncs import SMALL_DELTA_X,  SMALL_DELTA_F,  SMALL_DF
,  IS_LINE_SEARCH_FAILED
      7 from UkrOptMisc import getConstrDirection

ImportError: cannot import name float128
WARNING: Failure executing file: <nlp_3.py>


Also, the only floats available in my numpy version are:

In [7]: numpy.float
numpy.float    numpy.float64  numpy.float_
numpy.float32  numpy.float96  numpy.floating


HTH,
Dave



More information about the Scipy-dev mailing list