4 ms·
For such basic functionality, is there any reason not to just use Python 3's `statistics` module? from statistics import mean, median, stdev, variance
by lettuce 9y ago
For such basic functionality, is there any reason not to just use Python 3's `statistics` module?
from statistics import mean, median, stdev, variance
- jzwinck 9y agoTwo reasons. First is that NumPy works in Python 2 as well as 3. Second is that everyone uses NumPy for this. It is proven, it is fast, and using it for simple things is a great way to get started on a path toward using it for more complex things. For example I use NumPy for tabular text processing sometimes, as it is much faster than the built-in stuff if you have a lot of data.