ndsplines._not_a_knot

ndsplines._not_a_knot(x, k, left=True, right=True)

Utility function to perform the knot portion of the not-a-knot procedure. For any side that does not recieve the not-a-knot, augmentation for derivative specification is performed instead. Use None to leave un-modified.

Parameters:
  • x (ndarray, shape=(n,), dtype=np.float_) – Knot array to perform the not-a-knot procedure on

  • k (int) – Degree of desired spline

  • left (bool) – Whether to apply not-a-knot to the left side. Optional, default is True.

  • right (bool) – Whether apply to not-a-knot to the right side. Optional, default is True.

Returns:

t – Knot array with left and/or right not-a-knot procedure applied.

Return type:

ndarray