NumPy - Aggregation Functions
What is the output of the following code?
import numpy as np arr = np.array([2, 4, 4, 4, 5, 5, 7, 9]) print(np.var(arr))
import numpy as np arr = np.array([2, 4, 4, 4, 5, 5, 7, 9]) print(np.var(arr))
np.var() by default calculates population variance (divides by N). So output is 4.0.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions