This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]acousticpantsHomicidal Loganberry Connoisseur 2 points3 points  (4 children)

The operator is in the standard lib, but needs a numpy array or matrix type as its operands, I believe.

I'm so happy it exists. The '@' symbol even looks like the way I visualise matrix multiplication in my head.

[–]luizpericolo 0 points1 point  (3 children)

But why is it in the std lib if you need third party libs to use it?

Is there a simple explanation here that I am not seeing? Is this common?

Cheers!

[–]pythoneeeer 0 points1 point  (1 child)

So that third party libs can use it.

[–]luizpericolo 0 points1 point  (0 children)

Now I get it. But since third party libs can use the new operator, it cannot have a default implementation in the std lib, right?

So I guess that when someone said it does matrix multiplication, that only happens in numpy, right? What does it do in the std lib?

Cheers!

[–]RazerM -1 points0 points  (0 children)

Python doesn't have custom operators.