[Numpy-discussion] Two questions about PEP 465 dot product
Alexander Belopolsky
ndarray at mac.com
Fri May 22 13:57:17 EDT 2015
On Thu, May 21, 2015 at 9:37 PM, Nathaniel Smith <njs at pobox.com> wrote:
>
> .. there's been some discussion of the possibility of
> adding specialized gufuncs for broadcasted vector-vector,
> vector-matrix, matrix-vector multiplication, which wouldn't do the
> magic vector promotion that dot and @ do.
This would be nice. What I would like to see is some consistency between
multi-matrix
support in linalg methods and dot.
For example, when A is a matrix and b is a vector and
a = linalg.solve(A, b)
then
dot(A, a) returns b, but if either or both A and b are stacks, this
invariant does not hold. I would like
to see a function (say xdot) that I can use instead of dot and have xdot(A,
a) return b whenever a = linalg.solve(A, b).
Similarly, if w,v = linalg.eig(A), then dot(A,v) returns w * v, but only
if A is 2d.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150522/dbb9f635/attachment.html>
More information about the NumPy-Discussion
mailing list