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:
    xvals ndarray, shape(npts, ndim)

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

    t tuple of 1D ndarrays, length-ndim

      Knot vectors in directions 1, 2, … ndim,

    k int

      B-spline degree.

    extrapolate bool, optional

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

  Returns:
    design_matrix a 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.