[Numpy-discussion] Support of @= in numpy?

Sturla Molden sturla.molden at gmail.com
Sun Dec 27 10:18:04 EST 2015


Charles R Harris <charlesr.harris at gmail.com> wrote:

> In any case, we support the `@` operator in 1.10, but not the `@=`
> operator. The `@=` operator is tricky to have true inplace matrix
> multiplication, as not only are elements on the left overwritten, but the
> dimensions need to be preserved.

As long as we use BLAS, we can never have true inplace matrix
multiplication because Fortran prohibits pointer aliasing. We therefore
need to make a temporary copy before we call BLAS.

But as for preserving dimensions: This should be allowed if the array is
square. 

Sturla




More information about the NumPy-Discussion mailing list