<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello all,</div><div dir="ltr"><br></div><div dir="ltr">Can an m x n x k matrix be multiplied with n x k matrix? Looking at the Numpy doc page 46 (<a href="https://docs.scipy.org/doc/numpy-1.11.0/numpy-user-1.11.0.pdf">https://docs.scipy.org/doc/numpy-1.11.0/numpy-user-1.11.0.pdf</a>), it should work.</div><div dir="ltr"><br></div><div dir="ltr">It says the following:</div>A (3d array): 15 x 3 x 5<br>B (2d array):         3 x 5<br>Result (3d array): 15 x 3 x 5</div><div dir="ltr"><br></div><div dir="ltr">But, the rule did not work for me. Here's my toy example:<div dir="ltr"><div style="line-height:23px">>>> a = np.arange(3*4*5).reshape(3,4,5) </div><div style="line-height:23px">>>> b = np.arange(4*5).reshape(4,5)<br>>>> np.dot(a, b)<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>ValueError: shapes (3,4,5) and (3,5) not aligned: 5 (dim 2) != 3 (dim 0)<div><br></div><div>Am I miss reading something? Thank you in advance!</div><div><br></div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:15px;white-space:pre"></div></div></div></div></div></div></div>