'Evaluate many derivatives of the polynomial at the point x
Produce an array of all derivative values at the point x.
Parameters
x : array_like
Point or points at which to evaluate the derivatives
der : int or None, optional
How many derivatives to extract; None for all potentially
nonzero derivatives (that is a number equal to the number
of points). This number includes the function value as 0th
derivative.
Returns
d : ndarray
Array with derivatives; d[j] contains the j-th derivative.
Shape of d[j] is determined by replacing the interpolation
axis in the original array with the shape of x.
Examples
>>> from scipy.interpolate import KroghInterpolator
>>> KroghInterpolator([0,0,0],[1,2,3]).derivatives(0)
array([1.0,2.0,3.0])
>>> KroghInterpolator([0,0,0],[1,2,3]).derivatives([0,0])
array([[1.0,1.0],
[2.0,2.0],
[3.0,3.0]])'

def derivatives(self, x, der=None):

    (x, x_shape) = self._prepare_x(x)
    y = self._evaluate_derivatives(x, der)
    y = y.reshape((((y.shape[0],) + x_shape) + self._y_extra_shape))
    if ((self._y_axis != 0) and (x_shape != ())):
        nx = len(x_shape)
        ny = len(self._y_extra_shape)
        s = ((([0] + list(range((nx + 1), ((nx + self._y_axis) + 1)))) + list(range(1, (nx + 1)))) + list(range(((nx + 1) + self._y_axis), ((nx + ny) + 1))))
        y = y.transpose(s)
    return y
