Re: [Numpy-discussion] Unwanted upcast from uint64 to float64

2006-08-31 Thread Torgil Svensson
> Yes, because you are adding a signed scalar to an unsigned scalar and a > float64 is the only thing that can handle it > > t+numpy.uint64(1) Thanks, this make sense. This is a good thing to have back in the head. //Torgil On 8/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Torgil Svensso

Re: [Numpy-discussion] Unwanted upcast from uint64 to float64

2006-08-31 Thread Travis Oliphant
Torgil Svensson wrote: > I'm using windows datetimes (100nano-seconds since 0001,1,1) as time > in a numpy array and was hit by this behaviour. > > numpy.__version__ > '1.0b4' > a=numpy.array([63292539433000L],numpy.uint64) t=a[0] t > 632925

[Numpy-discussion] Unwanted upcast from uint64 to float64

2006-08-30 Thread Torgil Svensson
I'm using windows datetimes (100nano-seconds since 0001,1,1) as time in a numpy array and was hit by this behaviour. >>> numpy.__version__ '1.0b4' >>> a=numpy.array([63292539433000L],numpy.uint64) >>> t=a[0] >>> t 63292539433000L >>> type(t) >>> t+1 6.3292539433e+017 >>> type(t+1) >>> t=