Magnus Lie Hetland wrote:
> On Dec 15, 2008, at 17:57 , Dag Sverre Seljebotn wrote:
>   
>> Yes, this is very expected on 64-bit systems, I suppose Robert's  
>> slides
>> are in error.
>>
>> Basically the "np.int" type object is defined (by NumPy) to be long
>> (probably on merit of being the most convenient int type; read  
>> "np.int"
>> as saying "Integer", not a C int).
>>     
>
> I see... But, as I mentioned, x.dtype is Int32 (or seems to be, when I  
> print out repr(x))... I also believe I tried explicitly setting the  
> type to int32 (although I am now on a different machine, without the  
> proper software installed, so I can't check right now :)
>   
Actually, this was an error with Cython (which actually would occur on 
32-bit systems only). You can retrieve a fixed version from

http://hg.cython.org/cython

(and in the next bugfix release which shouldn't be too far off). Or, use 
"np.int" as the type instead which will work with all recent releases.

(Note that my point still stands, your code would have failed to work on 
a 64-bit system, but that was not the issue you were running into.)

Thanks for bringing this to our attention!

Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to