[SciPy-dev] openopt example mmp_1.py
Travis E. Oliphant
Mon Feb 4 16:43:16 CST 2008
Alan G Isaac wrote:
> On Mon, 4 Feb 2008, Stefan van der Walt apparently wrote:
>> In : isinstance(np.int64,int)
>> Out: False
> Well that is not too surprising. ;-)
> But the following was surprising to me,
> which is surely what you meant to explain:
> So, why the difference here?
> Does it go away when Python's difference
> between int and long goes away?
The technical problem here is that to sub-class built-in types (i.e.
those created in an extension module) in Python there must be binary
compatibility on the C-level.
So, int32 can have binary compatibility (on 32-bit system anyway),
while int64 can't. When int's and long's are united, some
unspecified adjustment will have to be made. In a sense, NumPy's
int-type splitting is opposite in intent of Python's integer
unification. Handling this well will require some thought.
> Scipy-dev mailing list
More information about the Scipy-dev