NumPy - Broadcasting
What is the output of the following code?
import numpy as np arr = np.array([1, 2, 3]) result = arr * 3 print(result)
import numpy as np arr = np.array([1, 2, 3]) result = arr * 3 print(result)
[1, 2, 3] is multiplied by 3, resulting in [3, 6, 9].15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions