In [1]:
import numpy as np

In [2]:
A = np.array([[1,2],[3,4]])
A.shape


Out[2]:
(2, 2)

In [3]:
B = np.array([[5,6],[7,8]])

In [4]:
B.shape


Out[4]:
(2, 2)

In [5]:
np.dot(A,B)


Out[5]:
array([[19, 22],
       [43, 50]])

In [6]:
A = np.array([[1,2],[3,4],[5,6]])

In [7]:
A.shape


Out[7]:
(3, 2)

In [8]:
B = np.array([7,8])

In [9]:
B.shape


Out[9]:
(2,)

In [10]:
np.dot(A,B)


Out[10]:
array([23, 53, 83])

In [11]:
np.dot(A,B).shape


Out[11]:
(3,)

In [12]:
C = np.dot(A,B)

In [13]:
C


Out[13]:
array([23, 53, 83])

In [14]:
print(C)


[23 53 83]

In [15]:
C.shape


Out[15]:
(3,)

In [ ]: