> The main motivation for the @ PEP was actually to be able to get rid of
> objects like np.matrix and scipy.sparse matrices that redefine the meaning
> of the * operator. Quote: "This PEP proposes the minimum effective change
> to Python syntax that will allow us to drain this swamp [meaning np.matrix
> & co]."
>
> Notably, the @ PEP was written by Nathaniel, who was opposed to a copying
> .H.
>

I should note that my comment invoking the history of @ was about the
regular transpose, .mT.  The executive summary of the PEP includes the
following relevant sentence:
"""
Currently, most numerical Python code uses * for elementwise
multiplication, and function/method syntax for matrix multiplication;
however, this leads to ugly and unreadable code in common circumstances.
"""

Exactly the same holds for matrix transpose, and indeed for many matrix
expressions the gain in readability is lost without a clean option to do
the transpose.

-- Marten
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to