[Numpy-discussion] Matrix multiplication infix operator PEP nearly ready to go

Alan G Isaac alan.isaac at gmail.com
Wed Mar 12 21:03:46 EDT 2014


On 3/12/2014 6:04 PM, Nathaniel Smith wrote:
>    https://github.com/numpy/numpy/pull/4351


The Semantics section still begins with 0d, then 2d, then 1d, then nd.
Given the context of the proposal, the order should be:

2d (the core need expressed in the proposal)
nd (which generalizes via broadcasting the 2d behavior)
1d (special casing)
0d (error)

In this context I see one serious problem: is there a NumPy function
that produces the proposed nd behavior?  If not why not, and
can it really be sold as a core need if the need to implement
it has never been pressed to the point of an implementation?

Unless this behavior is first implemented, the obvious question remains:
why will `@` not just implement `dot`, for which there is a well
tested and much used implementation?

Note I am not taking a position on the semantics.  I'm just pointing
out a question that is sure to arise.

Cheers,
Alan




More information about the NumPy-Discussion mailing list