NumPy - Aggregation Functions
Which of the following is the correct syntax to calculate variance of array
arr using NumPy?arr using NumPy?np.var().np.var(arr) which is correct. np.variance(arr) uses a non-existent function np.variance(). arr.var() uses arr.var() which works only if arr is a NumPy array, but the question asks for NumPy function syntax. np.std(arr) calculates standard deviation, not variance.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions