You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked into this and it works for me because in the notebook, the type of mean_b and mean_a is numpy.float64. In this case, numpy will implicitly convert the list to np.array and make it work. Your error message suggests that the means are float on your system. The floats are from:
In #26, the same issue was reported. In this case, pandas was version 1.1.3 and numpy 1.19.5. I assume that the issue was caused by a regression in the mean function and that this is now fixed again.
practical-statistics-for-data-scientists/python/code/Chapter 3 - Statistial Experiments and Significance Testing.py
Line 77 in 0db4dbb
This line brings typeerror: TypeError: '>' not supported between instances of 'list' and 'float'
It would be better to correct this line to
print(np.mean(np.array(perm_diffs) > mean_b - mean_a))
The text was updated successfully, but these errors were encountered: