def _from_derivatives(xi, yi, x, order=None, der=0, extrapolate=False):
 import scipy
 from scipy import interpolate
 if (LooseVersion(scipy.__version__) < '0.18.0'):
  try:
   method = interpolate.piecewise_polynomial_interpolate
   return method(xi, yi.reshape((-1), 1), x, orders=order, der=der)
  except AttributeError:
   pass
 method = interpolate.BPoly.from_derivatives
 m = method(xi, yi.reshape((-1), 1), orders=order, extrapolate=extrapolate)
 return m(x)

def _from_derivatives ( xi , yi , x , order = None , der = 0 , extrapolate = False ) : import scipy from scipy import interpolate if ( LooseVersion ( scipy . __version__ ) < '0.18.0' ) : try : method = interpolate . piecewise_polynomial_interpolate return method ( xi , yi . reshape ( ( - 1 ) , 1 ) , x , orders = order , der = der ) except AttributeError : pass method = interpolate . BPoly . from_derivatives m = method ( xi , yi . reshape ( ( - 1 ) , 1 ) , orders = order , extrapolate = extrapolate ) return m ( x )
convenience function for interpolate .