import numpy as np a = np.arange(6).reshape(2, 3) print( a ) print() print( 2 * a ) print( (2,) * a ) print() print( (2, 2, 2) * a ) #print( (2, 2) * a ) # ValueError: operands could not be broadcast together with shapes (2,) (2,3)