[SciPy-dev] openopt example mmp_1.py

Alan G Isaac aisaac@american....
Mon Feb 4 16:07:18 CST 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