TypeError: ttest_1samp() got an unexpected keyword argument 'alternative'

Viewed 5391

I keep getting this error message:

TypeError: ttest_1samp() got an unexpected keyword argument 'alternative'

My code is:

test_stat, p_value = ttest_1samp(FF['Time'], popmean=40, alternative='greater')
print('the p-value is', p_value)
1 Answers

Updating scipy version should help:

pip install --upgrade scipy
Related