Mean, Var, and Std - Hacker Rank Solution
This can be solved using the mean
, var
and std
tools.
import numpy
N, M = map(int, raw_input().split())
my_array = numpy.array([ map(int, raw_input().split()) for i in range(N) ])
print numpy.mean(my_array, axis = 1)
print numpy.var(my_array, axis = 0)
print numpy.std(my_array, axis = None)
it is useful thanks bro
ReplyDeletethe soln is not correct i am still getting some space error
ReplyDeletePut this before you print the output:
Deletenumpy.set_printoptions(legacy='1.13')
why this
Deletefor old vision
ReplyDeleteerror in line 4:(
ReplyDelete