[Numpy-discussion] What type should / return in python 3kwhen applied to two integer types?

Charles R Harris charlesr.harris@gmail....
Fri Aug 28 11:31:44 CDT 2009


On Fri, Aug 28, 2009 at 9:47 AM, Citi, Luca <lciti@essex.ac.uk> wrote:

> > The main issue is probably just choosing an appropriate float return
> > type, and personally I believe this should be same as numpy's default
> > float.
> I completely agree.
>
> Maybe we could let the user decide whether to use a different type.
> It is already somehow possible through the "out" argument.
> >>> np.true_divide(a, b, np.empty(a.shape, dtype=np.float32))
> but clearly a but clumsy.
>

The numpy true_divide function can be changed at runtime through the python
interface, one isn't stuck with the defaults for any of the python parsed
numeric methods. However, changing the defaults might lead to code
portability problems. I think it was a bad idea to have that facility...

<snip>
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090828/9acfe3f6/attachment.html 


More information about the NumPy-Discussion mailing list