Reputation: 53
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.
Upvotes: 3
Views: 5040
Reputation: 114781
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.
Upvotes: 4