def _akima_interpolate(xi, yi, x, der=0, axis=0):
 from scipy import interpolate
 try:
  P = interpolate.Akima1DInterpolator(xi, yi, axis=axis)
 except TypeError:
  P = interpolate.Akima1DInterpolator(xi, yi)
 if (der == 0):
  return P(x)
 elif interpolate._isscalar(der):
  return P(x, der=der)
 else:
  return [P(x, nu) for nu in der]

def _akima_interpolate ( xi , yi , x , der = 0 , axis = 0 ) : from scipy import interpolate try : P = interpolate . Akima1DInterpolator ( xi , yi , axis = axis ) except TypeError : P = interpolate . Akima1DInterpolator ( xi , yi ) if ( der == 0 ) : return P ( x ) elif interpolate . _isscalar ( der ) : return P ( x , der = der ) else : return [ P ( x , nu ) for nu in der ]
convenience function for akima interpolation .