[Numpy-discussion] improvement request to np.dot(a, b) - extended precision summation
Fri Feb 13 14:04:12 CST 2009
I'd like accumulate the summation in extended precision, "double"
sum for float inputs, "long double" sum for "double" inputs.
A way of doing this is to add an optional third argument to dot - to
specify the summation type.
I've looked into the code, and the source file multiarraymodule.c has
new_array_for_sum(PyArrayObject *ap1, PyArrayObject *ap2,
If the implementation is to pass a third argument to dot that
specifies the resultant type, this routine would be modified to add
that third argument or type in its priority selection logic.
I've not written any code yet, and I'm not fussy as to how it gets
done. Is there another way to do this that I'm missing?
Thanks in advance,
More information about the Numpy-discussion