[Numpy-discussion] How exactly ought 'dot' to work?

Pauli Virtanen pav at iki.fi
Sat Feb 22 19:09:48 EST 2014

23.02.2014 00:03, Nathaniel Smith kirjoitti:
> Currently numpy's 'dot' acts a bit weird for ndim>2 or ndim<1. In
> practice this doesn't usually matter much, because these are very
> rarely used. But, I would like to nail down the behaviour so we can
> say something precise in the matrix multiplication PEP. 

I'm not sure it's necessary to say much about this in the PEP. It should
in my view concentrate on arguing why the new binop is needed in the
Python language, and for that, restricting to 2D is good enough IMHO.

How exactly Numpy makes use of the capability for > 2-dim arrays is
something that should definitely be discussed.

But I think this is a problem mainly interesting for Numpy devs, and not
for CPython devs.

Pauli Virtanen

More information about the NumPy-Discussion mailing list