October 13, 2015

Python 3.5 matrix multiplication

  • python3

I’m excited to hear that Python 3.5 has finally added an operator to handle matrix multiplication. Why you ask? Because I no longer have to call np.dot() every time I want to multiply two matrices. I can now use the new @ operator to multiply matrices. A @ B looks a lot nicer than np.dot(A, B) or A.dot(B) and will make it much more pleasant to write code that performs linear algebra. Python 3.5 has finally arrived in the official Arch Linux repos and I’m excited to get started using it.

I will surely be using this in the next notebook addition to ml-python, which will be a Support Vector Machine.