NumPy Matrix Multiplication -- np.matmul() and @ [Ultimate Guide]

preview_player
Показать описание
Have you ever tried to multiply two NumPy arrays together and got a result you didn't expect? NumPy's multiplication functions can be confusing. In this article, we'll explain everything you need to know about matrix multiplication in NumPy.

Read the full article at:

~~~
Become a better coder! Download the 5x Python Cheat Sheet Course (PDF). It’s free!

🐍 Cheating in Python? Of course! 🐍
See you soon -- it’s fun! 🤓
~~~

Experts in their fields read more books! Become a Python expert:

And become a Python master the fun way!
~~~

Start earning money by creating your own Python coding business (free webinar):
Рекомендации по теме
Комментарии
Автор

My first thought was like "why a 30 minutes video for multiplication topic only"? Frankly, in the end, I didn't regret at all... Nicely explained. Thanks

mahboob
Автор

In the last few minutes you discuss the left/right associativity question and then you finish with an example. Can you please tie those last two concepts together? How does A @ B @ C @ D relate to the left/right associativity issue?

dcyadgaroff
Автор

You just mention that in order to for matmul() to work the condition m x n = n x p must satisfy. I tried doing a 3 x 3 matrix multiplication using matmul() with 1 x 3 here. Technically the above condition doesnt satisfy but result is still produced without errors. So whats really happening here is the second 1 x 3 matrix getting converted to 3 x 1 matrix and then multiplied ?

thetruereality
Автор

thank you for a nice and thorough video. however, pure matrix multiplication is associative. so (a*b)*c=a*(b*c)

skypickle
visit shbcf.ru