[Numpy-discussion] Proposal to make power return float, and other such things.
robert.kern at gmail.com
Tue Feb 18 06:10:07 EST 2014
On Tue, Feb 18, 2014 at 10:59 AM, Todd <toddrjen at gmail.com> wrote:
> On Feb 18, 2014 11:55 AM, "Robert Kern" <robert.kern at gmail.com> wrote:
>> I am -1 on the proposal to make power(x:int, y:int) always return a
>> float. It is usually trivial to just make the exponent a float if one
>> wants a float returned. Or we could introduce an fpow() that always
>> coerces the inputs to the best inexact type.
> What about making it floats for int types but int for uint types?
Doesn't really do it for me. int_array**2 would now return a float for
no good reason.
More information about the NumPy-Discussion