
June 6, 2016
7:35 p.m.
On Mon, Jun 6, 2016 at 3:32 PM, Jaime Fernández del Río < jaime.frio@gmail.com> wrote:
Since we are at it, should quadratic/bilinear forms get their own function too? That is, after all, what the OP was asking for.
If we have matvecmul and vecmul, then how to implement bilinear forms efficiently becomes pretty clear: np.vecmul(b, np.matvecmul(A, b)) I'm not sure writing a dedicated function in numpy itself makes sense for something this easy. I suppose there would be some performance gains from not saving the immediate result, but I suspect this would be premature optimization in most cases.