def pchip_interpolate(xi, yi, x, der=0, axis=0):
 P = PchipInterpolator(xi, yi, axis=axis)
 if (der == 0):
  return P(x)
 elif _isscalar(der):
  return P.derivative(der)(x)
 else:
  return [P.derivative(nu)(x) for nu in der]

def pchip_interpolate ( xi , yi , x , der = 0 , axis = 0 ) : P = PchipInterpolator ( xi , yi , axis = axis ) if ( der == 0 ) : return P ( x ) elif _isscalar ( der ) : return P . derivative ( der ) ( x ) else : return [ P . derivative ( nu ) ( x ) for nu in der ]
convenience function for pchip interpolation .