Permalink
Browse files

BUG: Fix import. Closes #229.

  • Loading branch information...
1 parent 3964fe9 commit d40fff9aa537d10837a6f2b013e31d545934e2bc @jseabold jseabold committed Apr 17, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 statsmodels/distributions/empirical_distribution.py
View
6 statsmodels/distributions/empirical_distribution.py
@@ -2,6 +2,7 @@
Empirical CDF Functions
"""
import numpy as np
+from scipy.interpolate import interp1d
def _conf_set(F, alpha=.05):
r"""
@@ -139,16 +140,15 @@ def __init__(self, x, side='right'):
y = np.linspace(1./nobs,1,nobs)
super(ECDF, self).__init__(x, y, side=side, sorted=True)
else:
- from scipy import interpolate
- return interpolate.interp1d(x,y,drop_errors=False,fill_values=ival)
+ return interp1d(x,y,drop_errors=False,fill_values=ival)
def monotone_fn_inverter(fn, x, vectorized=True, **keywords):
"""
Given a monotone function x (no checking is done to verify monotonicity)
and a set of x values, return an linearly interpolated approximation
to its inverse from its values on x.
"""
-
+ x = np.asarray(x)
if vectorized:
y = fn(x, **keywords)
else:

0 comments on commit d40fff9

Please sign in to comment.