You are viewing a single comment's thread. Return to all comments →
import numpy N, M = map(int, input().strip().split()) my_arr = numpy.array([input().strip().split()[:M] for _ in range(N)], dtype=numpy.float_) print(numpy.mean(my_arr, axis=1)) print(numpy.var(my_arr, axis=0)) print(round(numpy.std(my_arr, axis = None), 11))
Seems like cookies are disabled on this browser, please enable them to open this website
Mean, Var, and Std
You are viewing a single comment's thread. Return to all comments →
import numpy N, M = map(int, input().strip().split()) my_arr = numpy.array([input().strip().split()[:M] for _ in range(N)], dtype=numpy.float_) print(numpy.mean(my_arr, axis=1)) print(numpy.var(my_arr, axis=0)) print(round(numpy.std(my_arr, axis = None), 11))