[SciPy-dev] openopt example mmp_1.py

Nils Wagner nwagner at iam.uni-stuttgart.de
Sun Feb 3 05:13:08 EST 2008


On Sun, 03 Feb 2008 11:39:02 +0200
  dmitrey <dmitrey.kroshko at scipy.org> wrote:
> Nils, I have updated numpy from svn (1.0.5.dev4767) , 
>and all still works ok
> Could you check via debugger or somehow else, why the 
>case "numpy.int32" 
> is not handled by the line 355 from objFunRelated.py:
> 
> "if type(ind) in [int, int32, int64]: return [ind]"
> as far as I understand from the stack data you have 
>attached, it goes to 
> line 358 instead:
> p.err('incorrect func index type!')
> 
> And/or, could anyone else update openopt from svn and 
>run 
> /examples/mmp_1.py ?
> 
> Regards, .
> 

Hi Dmitrey,

I have no idea. If I run

from numpy import *
a=0
b = int32(15)
print type(a), type(b)

L = [int, int32, int64]

if type(a) in L:

     print 'works for me'

if type(b) in L:

     print 'works for me'

I get
/usr/bin/python test_liste.py
<type 'int'> <type 'numpy.int32'>
works for me
works for me



Nils



More information about the SciPy-Dev mailing list