[Numpy-discussion] What type should / return in python 3k whenapplied to two integer types?
Charles R Harris
Thu Aug 27 13:54:28 CDT 2009
On Thu, Aug 27, 2009 at 12:50 PM, Charles R Harris <
> 2009/8/27 Nadav Horesh <email@example.com>
>> Double is the natural choice, there is a possibility of long double
>> (float96 on x86 or float128 on amd64) where there is no precision loss. Is
>> this option portable?
> Not really. The long double type can be a bit weird and varies from
> architecture to architecture.
The real problem is deciding what to do with integer precisions that fit in
float32. At present we have
In : x = ones(1, dtype=int16)
In : true_divide(x,x)
Out: array([ 1.], dtype=float32)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion