Why doesn't stats.sem () recognize the nan_policy keyword?

The code:

e = [1, 2, 3, 4, 5]
s = stats.sem(e, nan_policy = 'omit')

Error:

sem() got an unexpected keyword argument 'nan_policy'

I do not understand why I am getting this error; "nan_policy" is an excellent parameter acceptable for stats.sem().

+4
source share
1 answer

scipy.stats.semjust got the keyword argument nan_policyin version 0.17.0. Most likely, you use release 0.16.0, like many others, in which case you have access to only two other arguments of the keyword axisand ddof.

From the release notes for 0.17.0 :

scipy.stats nan_policy, , NaN : NaN, NaNs.

, NaN .

+4

All Articles