@ -2,6 +2,12 @@
Changelog
=========
2.1.1
=====
* Import scipy as a last resort in stats.py (should fix bugs like #294 if scipy is installed but not used)
2.1.0
@ -1,8 +1,4 @@
from math import log, sqrt, pi
try:
from scipy import stats
except ImportError:
stats = None
def erfinv(x, a=.147):
@ -24,6 +20,11 @@ def norm_ppf(x):
def ppf(x, n):
if stats:
if n < 30:
return stats.t.ppf(x, n)
@ -368,8 +368,8 @@ class XLogView(View):
if x is None or x <= 0 or self.log10_xmax - self.log10_xmin == 0:
return None
return (self.width *
(log10(x) - self.log10_xmin)
/ (self.log10_xmax - self.log10_xmin))
(log10(x) - self.log10_xmin) /
(self.log10_xmax - self.log10_xmin))
class XYLogView(XLogView, LogView):