NumPy - Array Operations
What is the output of the following code?
import numpy as np arr = np.array([1, 4, 9, 16]) result = np.sqrt(arr) print(result)
import numpy as np arr = np.array([1, 4, 9, 16]) result = np.sqrt(arr) print(result)
np.sqrt on each element: sqrt(1)=1.0, sqrt(4)=2.0, sqrt(9)=3.0, sqrt(16)=4.0.[1. 2. 3. 4.].15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions