[Numpy-discussion] Binary ufuncs: add, subtract, multiply

Stéfan van der Walt stefan at sun.ac.za
Tue May 27 04:05:36 EDT 2008


2008/5/27 Charles R Harris <charlesr.harris at gmail.com>:
> Is it appropriate to produce a double for mixed 'Q','b' types? Or should we
> raise a warning instead. There is a loss of precision going to doubles
> anyway, and that will also often be the case for the lower precision types
> when multiplying.

I don't think we should raise a warning by default.  If the result is
'Q', then overflow occurs in the minority of cases.

> I would also feel more comfortable if the output types
> were symmetric in the underlying c-type, even though l,i are the same
> precision on my machine.
> That might make things easier for folks using
> c-types or trying to embed numpy.

I agree.

Regards
Stéfan



More information about the NumPy-Discussion mailing list