Mean, Var, and Std

  • + 0 comments

    import numpy as np

    n, m = map(int, input().split())

    ar = np.array([list(map(int, input().split())) for i in range(n)])

    print(np.mean(ar, axis = 1)) print(np.var(ar, axis = 0)) print(round(np.std(ar), 11)) # 11 significant figures to match the expected result format