Fix calculation of statistics in the Python version.

Merged Paal Kvamme requested to merge kvamme62/statistics into master

Fix a problem with the calculated value range getting too wide.

Merge request reports