From: Pau G. <pau...@gm...> - 2006-07-13 09:52:36
|
On 7/11/06, Pau Gargallo <pau...@gm...> wrote: > On 7/11/06, Travis Oliphant <oli...@ie...> wrote: > > Pau Gargallo wrote: > > > hi, > > > > > > looking at the upcasting table at > > > http://www.scipy.org/Tentative_NumPy_Tutorial#head-4c1d53fe504adc97baf27b65513b4b97586a4fc5 > > > I saw that int's are sometimes casted to uint's. > > > > > > In [3]: a = array([3],int16) > > > In [5]: b = array([4],uint32) > > > In [7]: a+b > > > Out[7]: array([7], dtype=uint32) > > > > > > is that intended? > > > > > It's a bug. The result should be int64. I've fixed it in SVN. > > > > Thanks!! > hi Travis, now uint64+int gives float64. Obtaining a float from ints surprise me. But anyway, I don't know if there is a better choice. pau |