<br><br><div class="gmail_quote">On Mon, Jun 1, 2009 at 11:08 PM, David Cournapeau <span dir="ltr"><<a href="mailto:david@ar.media.kyoto-u.ac.jp">david@ar.media.kyoto-u.ac.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
    I have a question related to #1121<br>
(<a href="http://projects.scipy.org/numpy/ticket/1121" target="_blank">http://projects.scipy.org/numpy/ticket/1121</a>). With python 2.6,<br>
PyInt_Check(a) if a is an instance of numpy.int32 does not work anymore.<br>
It think this is related to the python issue 2263<br>
(<a href="http://bugs.python.org/issue2263" target="_blank">http://bugs.python.org/issue2263</a>), where the tp_flags has been changed<br>
for the python int object, change which influences PyInt_Check behavior.<br>
<br>
What should we do about it ? Right now, it looks like the bitfields are<br>
harcoded in scalar types - shouldn't we inherit them from the original<br>
python types (in a field per field manner) instead ?<br>
</blockquote><div><br>Maybe, but why should it work for int32 anyway? IIRC, the python int type has different lengths on windows and linux 64 bit systems. And what about 3.0?<br><br>I think we probably need to do something here, but I'm not sure what. The different behavior of the numpy double and integer types corresponding to the python types as opposed to the rest of the scalar types is an issue that has annoyed me since forever.<br>
<br>Chuck<br></div><br></div><br>