4 ms·
It does away with the need for a separate matrix type. When you are using numpy (most imported non stdlib library according to the pep!) and you have two array
by aaren 13y ago
It does away with the need for a separate matrix type.
When you are using numpy (most imported non stdlib library according to the pep!) and you have two arrays a and b, a * b is elementwise multiplication.
numpy currently has a matrix type. When a and b are both matrices, a * b is matrix multiplication.
The @ operator would do away with the need for a matrix type. Then, a * b is element wise and a @ b is matrix wise, and a and b are always the same type. This would simplify numpy and lots of things that are based on it.
- bsaul 13y ago"The @ operator would do away for a matrix type" which is only an issue because every lib needs to define its own matrix type ? Then why isn't the solution to provide this type in the standard lib ?