[SciPy-dev] openopt example mmp_1.py

Nils Wagner nwagner@iam.uni-stuttgart...
Sun Feb 3 04:13:08 CST 2008

On Sun, 03 Feb 2008 11:39:02 +0200
  dmitrey <dmitrey.kroshko@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 
> /examples/mmp_1.py ?
> Regards, .

Hi Dmitrey,

I have no idea. If I run

from numpy import *
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


More information about the Scipy-dev mailing list