As the title states, when I try to specify an alternative hypothesis using the 'alternative' parameter for the scipy.stats.wilcoxon()function, it throws a TypeError. The TypeError states wilcoxon() got an unexpected keyword argument 'alternative'.
I don't encounter any issues when I specify different a different zero_method and runs as expected when I remove the 'alternative' parameter.
Scipy version 1.2.1.
Any help would be greatly appreciated.
Code as simple as:
from scipy.stats import wilcoxon
data = [1,2,3,4,5,6,7,8,9]
print(wilcoxon(data, alternative='greater'))
will cause the TypeError to appear.
The alternative parameter was added to scipy.stats.wilcoxon in SciPy 1.3.0.
Unfortunately, the addition is not mentioned in the 1.3.0 release notes. The change is among the pull requests for 1.3.0, though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With