def _akima_interpolate(xi, yi, x, der=<NUM_LIT:0>, axis=<NUM_LIT:0>):
from scipy import interpolate<EOL>try:<EOL><INDENT>P = interpolate.Akima1DInterpolator(xi, yi, axis=axis)<EOL><DEDENT>except TypeError:<EOL><INDENT>P = interpolate.Akima1DInterpolator(xi, yi)<EOL><DEDENT>if der == <NUM_LIT:0>:<EOL><INDENT>return P(x)<EOL><DEDENT>elif interpolate._isscalar(der):<EOL><INDENT>return P(x, der=der)<EOL><DEDENT>else:<EOL><INDENT>return [P(x, nu) for nu in der]<EOL><DEDENT>
Convenience function for akima interpolation.
xi and yi are arrays of values used to approximate some function f,
with ``yi = f(xi)``.

See `Akima1DInterpolator` for details.

Parameters
----------
xi : array_like
    A sorted list of x-coordinates, of length N.
yi :  array_like
    A 1-D array of real values.  `yi`'s length along the interpolation
    axis must be equal to the length of `xi`. If N-D array, use axis
    parameter to select correct axis.
x : scalar or array_like
    Of length M.
der : int or list, optional
    How many derivatives to extract; None for all potentially
    nonzero derivatives (that is a number equal to the number
    of points), or a list of derivatives to extract. This number
    includes the function value as 0th derivative.
axis : int, optional
    Axis in the yi array corresponding to the x-coordinate values.

See Also
--------
scipy.interpolate.Akima1DInterpolator

Returns
-------
y : scalar or array_like
    The result, of length R or length M or M by R,