[SciPy-dev] openopt example mmp_1.py

Alan G Isaac aisaac@american....
Sun Feb 3 10:32:55 CST 2008


On Sun, 3 Feb 2008, (UTC) Dave apparently wrote:
> ipdb> ind 
> 0
> ipdb> type(ind)
> <type 'numpy.int32'> 
> ipdb> int32 
> <type 'numpy.int32'> 
> ipdb> type(ind) is int32 
> False 
> ipdb> id(type(ind))
> 1810415712 
> ipdb> id(int32)
> 1810415520 
> ipdb> import numpy 
> ipdb> numpy.int32 
> <type 'numpy.int32'> 
> ipdb> id(numpy.int32)
> 1810415520 
> ipdb> 


Well that explains the comparison failure.
But I do not know the circumstances under
which two difference types will represent
themselves as the same type.  Except for
redefinition, of course.

In this example, how was ``ind`` created?

Cheers,
Alan Isaac





More information about the Scipy-dev mailing list