In [26]:
import numpy as np
a = np.array([1, 2, 3])
m = np.array([[1, 2, 3], [4, 5, 6]])
print(a, '\n', a*2, '\n', 2*a)
print(m, '\n', m*2, '\n', 2*m)
p = m.dot(a)
print(p)
print(a.shape, m.shape, p.shape)
In [27]:
np.array([1,2,3]) == np.array([1,2,3])[:,None]
Out[27]:
In [ ]: