[SciPy-dev] openopt example mmp_1.py

Alan G Isaac aisaac at american.edu
Mon Feb 4 17:07:18 EST 2008


On Mon, 4 Feb 2008, Stefan van der Walt apparently wrote:
> In [1]: isinstance(np.int64,int)
> Out[1]: False 

Well that is not too surprising.  ;-)

>>> isinstance(N.int32,int)
False

But the following was surprising to me,
which is surely what you meant to explain:

>>> isinstance(N.int32(0),int)
True
>>> isinstance(N.int64(0),int)
False

So, why the difference here?
Does it go away when Python's difference
between int and long goes away?

Thanks,
Alan






More information about the SciPy-Dev mailing list