We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Numpy
- Mean, Var, and Std
- Discussions
Mean, Var, and Std
Mean, Var, and Std
Sort by
recency
|
405 Discussions
|
Please Login in order to post a comment
import numpy as np
arr = [list(map(int, input().split())) for _ in range(int(input().split()[0]))]
print(np.mean(arr, axis=1)) print(np.var(arr, axis=0)) print(round(np.std(arr, axis=None), 11))
import numpy as np np.set_printoptions(legacy='1.13') row,col = map(int,input().split()) arr = np.array([list(map(int,input().split()))for _ in range(row)]) print(np.mean(arr,axis=1)) print(np.var(arr,axis=0)) print(np.std(arr,axis=None))
I am not getting why its not showing the correct output