How-to calculate mean, variance, standard deviation for each of a matrix in python,? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How-to calculate mean, variance, standard deviation for each of a matrix in python,?

Numpy matrices in python

8th Aug 2021, 7:56 AM
alagammai uma
alagammai uma - avatar
2 Answers
+ 5
numpy come with functions for that, like np.mean(), np.var()... You can specify the axis for which the metrics are calculated (see the docs)
8th Aug 2021, 9:49 AM
Lisa
Lisa - avatar
+ 1
Lisa thank you
8th Aug 2021, 10:09 AM
alagammai uma
alagammai uma - avatar