FYI - draft PEP for adding a dedicated matrix multiplication operator to Python

26 views
Skip to first unread message

n...@vorpus.org

unread,
Mar 8, 2014, 10:49:02 PM3/8/14
to cvx...@googlegroups.com
Hi cvxoptistas,

I just wanted to give you all a heads-up about a draft Python
Enhancement Proposal that I'm working on, for adding a dedicated
matrix multiplication operator to Python (and thus getting rid of all
the mess about what * should mean):
  https://github.com/numpy/numpy/pull/4351
  https://github.com/njsmith/numpy/blob/matmul-pep/doc/neps/return-of-revenge-of-matmul-pep.rst

I'm not sure how relevant to cvxopt it is, since the PEP follows what (AFAICT) has become the majority convention among python libraries of using * for elementwise multiplication rather than matrix multiplication, while I know cvxopt uses the opposite convention, and I don't suppose you have any plans to break all your APIs at this point. But I'd still welcome any comments or thoughts you might have.

-n

n...@vorpus.org

unread,
Mar 15, 2014, 10:27:02 PM3/15/14
to cvx...@googlegroups.com
Hi again,

As an update: Guido has accepted the addition of @ as a matrix multiplication operator in principle, once some details are worked out:
    https://mail.python.org/pipermail/python-ideas/2014-March/027109.html

So if you want to provide any feedback, now is a good time! The current proposal can be seen here:
    http://legacy.python.org/dev/peps/pep-0465/

I've also started threads on numpy-discussion specifically about the details to be worked out, in case anyone wants to comment:

I believe that if you aren't subscribed to numpy-discussion, then you can still post through gmane (though unfortunately their anti-spam munging of the @ character makes these threads kind of hard to read!): http://news.gmane.org/gmane.comp.python.numeric.general

Cheers,
-n
Reply all
Reply to author
Forward
0 new messages