Charles R Harris wrote:
> 
> 
> On Tue, Feb 9, 2010 at 11:12 PM, David Cournapeau <courn...@gmail.com 
> <mailto:courn...@gmail.com>> wrote:
> 
>     Hi,
> 
>     I am a bit puzzled by the protocol for long(a) where a is a scalar
>     array. For example, for a = np.float128(1), I was expecting long(a) to
>     call a.__long__, but it does not look like it is the case. int(a) does
>     not call a.__int__ either. Where does the long conversion happen in
>     numpy for scalar arrays ?
> 
> 
> How did you tell, did you have print statements in the call?

Indirectly, yes (I was looking into #1395).

> I'm curious 
> if np.long the same as long?

At least, np.long(a) does not call a.__long__ either. I am on a 64 bits 
machine, BTW, but I don't think it matters since I have the same problem 
with int.

cheers,

David
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to