# Wilcoxon W value different from python

I use data from https://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test, W value is 9. But, for the following code W value is 18, what is the reason?

# Wilcoxon signed-rank test
from numpy.random import seed
from numpy.random import randn
from scipy.stats import wilcoxon
# seed the random number generator
seed(1)
# generate two independent samples

a=np.array([125,115,130,140,140,115,140,125,140,135])
b=np.array([110,122,125,120,140,124,123,137,135,145])

# compare samples
stat, p = wilcoxon(a,b)
print('Statistics=%.3f, p=%.3f' % (stat, p))
# interpret
alpha = 0.05
if p > alpha:
print('Same distribution (fail to reject H0)')
else:
print('Different distribution (reject H0)')


The original Wilcoxon's proposal used a different statistic. Denoted by Siegel as the $$T$$ statistic, it is the smaller of the two sums of ranks of given sign; in the example given below, therefore, $$T$$ would equal $$3+4+5+6=18$$