On Mo, 2015-08-03 at 21:32 +0200, Sturla Molden wrote:
> On 03/08/15 20:51, Chris Barker wrote:
> 
> > well, IIUC, np.int <http://np.int> is the python integer type, which is
> > a C long in all the implemtations of cPython that I know about -- but is
> > that a guarantee?in the future as well?
> 
> It is a Python int on Python 2.
> 
> On Python 3 dtype=np.int means the dtype will be C long, because a 
> Python int has no size limit. But np.int aliases Python int. And 
> creating an array with dype=int therefore does not create an array of 
> Python int, it creates an array of C long. To actually get dtype=int we 
> have to write dtype=object, which is just crazy.
> 

PS: I guess longdouble/complexlongdouble (and its floatXXX variants) are
missing. And it might be a good place to note that floatXXX is not IEEE
floatXXX.

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

Attachment: signature.asc
Description: This is a digitally signed message part

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

Reply via email to