human
Complete this python program:
def make_interp_spline(x, y, k=3, t=None, bc_type=None, axis=0, check_finite=True):
assistant
#Here is the Python code you requested.

    """Compute the (coefficients of) interpolating B-spline.
    Parameters
    x : array_like, shape (n,)
    Abscissas.
    y : array_like, shape (n, ...)
    Ordinates.
    k : int, optional
    B-spline degree. Default is cubic, k=3.
    t : array_like, shape (nt + k + 1,), optional.
    Knots.
    The number of knots needs to agree with the number of datapoints and
    the number of derivatives at the edges. Specifically, ``nt - n`` must
    equal ``len(deriv_l) + len(deriv_r)``.
    bc_type : 2-tuple or None
    Boundary conditions.
    Default is None, which means choosing the boundary conditions
    automatically. Otherwise, it must be a length-two tuple where the first
    element sets the boundary conditions at ``x[0]`` and the second
    element sets the boundary conditions at ``x[-1]``. Each of these must
    be an iterable of pairs ``(order, value)`` which gives the values of
    derivatives of specified orders at the given edge of the interpolation
    interval.
    axis : int, optional
    Interpolation axis. Default is 0.
    check_finite : bool, optional
    Whether to check that the input arrays contain only finite numbers.
    Disabling may give a performance gain, but may result in problems
    (crashes, non-termination) if the inputs do contain infinities or NaNs.
    Default is True.
    Returns
    b : a BSpline object of the degree ``k`` and with knots ``t``.
    Examples
    Use cubic interpolation on Chebyshev nodes:
    >>> def cheb_nodes(N):
    ...     jj = 2.*np.arange(N) + 1
    ...     x = np.cos(np.pi * jj / 2 / N)[::-1]
    ...     return x
    >>> x = cheb_nodes(20)
    >>> y = np.sqrt(1 - x**2)
    >>> from scipy.interpolate import BSpline, make_interp_spline
    >>> b = make_interp_spline(x, y)
    >>> np.allclose(b(x), y)
    True
    Note that the default is a cubic spline with a not-a-knot boundary condition
    >>> b.k
    3
    Here we use a \natural\ spline, with zero 2nd derivatives at edges:
    >>> l, r = [(2, 0)], [(2, 0)]
    >>> b_n = make_interp_spline(x, y,..."""
    if (bc_type is None):
        bc_type = (None, None)
    (deriv_l, deriv_r) = bc_type
    if (k == 0):
        if any(((_ is not None) for _ in (t, deriv_l, deriv_r))):
            raise ValueError('Too    much    info    for    k=0:    t    and    bc_type    can    only    be    None.')
        x = _as_float_array(x, check_finite)
        t = np.r_[(x, x[(-1)])]
        c = np.asarray(y)
        c = np.ascontiguousarray(c, dtype=_get_dtype(c.dtype))
        return BSpline.construct_fast(t, c, k, axis=axis)
    if ((k == 1) and (t is None)):
        if (not ((deriv_l is None) and (deriv_r is None))):
            raise ValueError('Too    much    info    for    k=1:    bc_type    can    only    be    None.')
        x = _as_float_array(x, check_finite)
        t = np.r_[(x[0], x, x[(-1)])]
        c = np.asarray(y)
        c = np.ascontiguousarray(c, dtype=_get_dtype(c.dtype))
        return BSpline.construct_fast(t, c, k, axis=axis)
    if (t is None):
        if ((deriv_l is None) and (deriv_r is None)):
            if (k == 2):
                t = ((x[1:] + x[:(-1)]) / 2.0)
                t = np.r_[(((x[0],) * (k + 1)), t[1:(-1)], ((x[(-1)],) * (k + 1)))]
            else:
                t = _not_a_knot(x, k)
        else:
            t = _augknt(x, k)
    x = _as_float_array(x, check_finite)
    y = _as_float_array(y, check_finite)
    t = _as_float_array(t, check_finite)
    k = int(k)
    axis = (axis % y.ndim)
    y = np.rollaxis(y, axis)
    if ((x.ndim != 1) or np.any((x[1:] <= x[:(-1)]))):
        raise ValueError('Expect    x    to    be    a    1-D    sorted    array_like.')
    if (k < 0):
        raise ValueError('Expect    non-negative    k.')
    if ((t.ndim != 1) or np.any((t[1:] < t[:(-1)]))):
        raise ValueError('Expect    t    to    be    a    1-D    sorted    array_like.')
    if (x.size != y.shape[0]):
        raise ValueError('x    and    y    are    incompatible.')
    if (t.size < ((x.size + k) + 1)):
        raise ValueError(('Got    %d    knots,    need    at    least   ...