NumPy - Broadcasting
What is the cause of the broadcasting error in this code?
import numpy as np x = np.array([1, 2, 3]) y = np.array([[1, 2], [3, 4]]) z = x + y
import numpy as np x = np.array([1, 2, 3]) y = np.array([[1, 2], [3, 4]]) z = x + y
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions