[Numpy-discussion] Row-wise dot product?

T J tjhnson@gmail....
Mon Sep 7 17:27:03 CDT 2009

On Mon, Sep 7, 2009 at 7:09 AM, Hans-Andreas Engel<engelh@deshaw.com> wrote:
> If you wish to avoid the extra memory allocation implied by `x*y'
> and get a ~4x speed-up, you can use a generalized ufunc
> (numpy >= 1.3, stolen from the testcases):
>   z = numpy.core.umath_tests.inner1d(x, y)

This is exactly what I was hoping for.  Now, I can also keep an array
of vectors and apply a rotation matrix to each vector.

Hopefully, these use cases show serve as good proof on why the
generalized ufunc machinery is useful.

More information about the NumPy-Discussion mailing list