[Numpy-discussion] Upcasting rules in numpy
Francesc Altet
faltet at carabos.com
Fri Jan 27 03:31:05 EST 2006
Hi,
I don't know if the next behaviour in NumPy is intended or not:
In [22]: (numpy.zeros((2,1), dtype="int8")*3.).dtype.type
Out[22]: <type 'float32_arrtype'>
while numarray and Numeric gives:
In [36]: (numarray.zeros((2,1), type="Int8")*3.).type()
Out[36]: Float64
In [37]: (Numeric.zeros((2,1), typecode="b")*3.).typecode()
Out[37]: 'd'
Would not be float64 a more sensible default for numpy as well?
Cheers,
--
>0,0< Francesc Altet http://www.carabos.com/
V V Cárabos Coop. V. Enjoy Data
"-"
More information about the NumPy-Discussion
mailing list