Open
Description
I'm working on a PR for SciPy that replaces the sum(x * y)
pattern with vecdot(x, y)
, since there are pretty substantial performance advantages. There is at least one place where the code currently relies on the keepdims
argument of sum
. Should that be accepted by vecdot
?
How about axis
tuples? I understand this does not look ideal, and I would also be happy if axis tuples were never allowed. But the motivation is the same - there are existing functions that use sum(x * y)
and support axis
tuples. If vecdot
doesn't allow them, these functions all have to manually ravel the axes of x
and y
separately. (This operation can be moved into a helper function if need be, but hopefully it need not be.)