Skip to main content
`Ctrl`+`K`
scipy.interpolate.NdBSpline.

# design_matrix

classmethod NdBSpline.design_matrix(xvals, t, k, extrapolate=True)

  Construct the design matrix as a CSR format sparse array.

  Parameters:
    xvalsndarray, shape(npts, ndim)

      Data points. `xvals[j, :]` gives the `j`-th data point as an `ndim`-dimensional array.

    ttuple of 1D ndarrays, length-ndim

      Knot vectors in directions 1, 2, … ndim,

    kint

      B-spline degree.

    extrapolatebool, optional

      Whether to extrapolate out-of-bounds values of raise a ValueError

  Returns:
    design_matrixa CSR array

      Each row of the design matrix corresponds to a value in xvals and contains values of b-spline basis elements which are non-zero at this value.