'Construct a new piecewise polynomial representing the antiderivative.
Antiderivative is also the indefinite integral of the function,
and derivative is its inverse operation.
Parameters
nu : int, optional
Order of antiderivative to evaluate. Default is 1, i.e. compute
the first integral. If negative, the derivative is returned.
Returns
pp : PPoly
Piecewise polynomial of order k2 = k + n representing
the antiderivative of this polynomial.
Notes
The antiderivative returned by this function is continuous and
continuously differentiable to order n-1, up to floating point
rounding error.
If antiderivative is computed and ``self.extrapolate=\'periodic\'``,
it will be set to False for the returned instance. This is done because
the antiderivative is no longer periodic and its correct evaluation
outside of the initially given x interval is difficult.'

def antiderivative(self, nu=1):

    if (nu <= 0):
        return self.derivative((- nu))
    c = np.zeros((((self.c.shape[0] + nu), self.c.shape[1]) + self.c.shape[2:]), dtype=self.c.dtype)
    c[:(- nu)] = self.c
    factor = spec.poch(np.arange(self.c.shape[0], 0, (-1)), nu)
    c[:(- nu)] /= factor[((slice(None),) + ((None,) * (c.ndim - 1)))]
    self._ensure_c_contiguous()
    _ppoly.fix_continuity(c.reshape(c.shape[0], c.shape[1], (-1)), self.x, (nu - 1))
    if (self.extrapolate == 'periodic'):
        extrapolate = False
    else:
        extrapolate = self.extrapolate
    return self.construct_fast(c, self.x, extrapolate, self.axis)
