import numpy as np a = np.random.randn(3,4) b = np.random.randn(1,4) c = a+b print (c)
[[ 0.32295651 -0.85615547 1.05162089 0.39146209] [-2.97129035 -1.50722391 -0.04004183 0.13532617] [ 1.57507404 -3.54460121 -0.21055781 0.47160234]]