Answers for "z-score"

0

z-score

# Computing along a specific axis, omitting nan values

>>> x = np.array([[25.11, 30.10, np.nan, 32.02, 43.15],
              ​[14.95, 16.06, 121.25, 94.35, 29.81]]) stats.zscore(x, axis=1, nan_policy='omit')
>>> array([[-1.13490897, -0.37830299,         nan, -0.08718406,  1.60039602],
      ​[-0.91611681, -0.89090508,  1.4983032 ,  0.88731639, -0.5785977 ]])
Posted by: Guest on April-13-2021

Python Answers by Framework

Browse Popular Code Answers by Language