Mean, Var, and Std

  • + 0 comments
    import numpy as np 
    
    N,M = map(int, input().split())
    
    input_list = []
    
    for i in range(N):
        input_list.append(list(map(int, input().split())))
     
    np_input_list = np.array(input_list, dtype=int)   
    
    print(np.mean(np_input_list, axis = 1))
    print(np.var(np_input_list,  axis = 0))
    print(round(np.std(np_input_list),11))