zscore python

Solutions on MaxInterview for zscore python by the best coders in the world

showing results for - "zscore python"
Josiah
12 Mar 2020
1from scipy import stats
2
3a = np.array([ 0.7972,  0.0767,  0.4383,  0.7866,  0.8091,
4               0.1954,  0.6307,  0.6599,  0.1065,  0.0508])
5
6stats.zscore(a) # z = (x - avg) / std
7>>> array([ 1.1273, -1.247 , -0.0552,  1.0923,  1.1664, 
8           -0.8559, 0.5786, 0.6748, -1.1488, -1.3324])