Commits

Alex Chan committed 56f7445c453
[gardening] Improve readability of `pstdev` function This doesn't change how the function works, just makes it easier to follow: * Add a docstring that explains how standard deviation is computed * Use `sample` instead of `l` for the input variable * Use `math.sqrt` for readability * Break it down into a couple of intermediate steps for ease of comprehension Plus a nicer error message in the case where you try to get the standard deviation of an empty list (previously you got a not-completely obvious ZeroDivisionError).