[Numpy-discussion] improvement request to np.dot(a, b) - extended precision summation
David Henderson
davidh at ipac.caltech.edu
Fri Feb 13 15:04:12 EST 2009
Hello all,
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
a routine:
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,
David
More information about the NumPy-Discussion
mailing list