@@ -14,40 +14,35 @@ class BSplineFamily(BasisFamily):
1414 """B-spline basis functions.
1515
1616 This class represents a B-spline basis for piecewise polynomials defined
17- across a set of breakpoints with given order and smoothness.
17+ across a set of breakpoints with given degree and smoothness. On each
18+ interval between two breakpoints, we have a polynomial of a given degree
19+ and the spline is continuous up to a given smoothness at interior
20+ breakpoints.
21+
22+ Parameters
23+ ----------
24+ breakpoints : 1D array or 2D array of float
25+ The breakpoints for the spline(s).
26+
27+ degree : int or list of ints
28+ For each spline variable, the degree of the polynomial between
29+ breakpoints. If a single number is given and more than one spline
30+ variable is specified, the same degree is used for each spline
31+ variable.
32+
33+ smoothness : int or list of ints
34+ For each spline variable, the smoothness at breakpoints (number of
35+ derivatives that should match).
36+
37+ vars : None or int, optional
38+ The number of spline variables. If specified as None (default),
39+ then the spline basis describes a single variable, with no indexing.
40+ If the number of spine variables is > 0, then the spline basis is
41+ index using the `var` keyword.
1842
1943 """
2044 def __init__ (self , breakpoints , degree , smoothness = None , vars = None ):
21- """Create a B-spline basis for piecewise smooth polynomials
22-
23- Define B-spline polynomials for a set of one or more variables.
24- B-splines are used as a basis for a set of piecewise smooth
25- polynomials joined at breakpoints. On each interval we have a
26- polynomial of a given order and the spline is continuous up to a
27- given smoothness at interior breakpoints.
28-
29- Parameters
30- ----------
31- breakpoints : 1D array or 2D array of float
32- The breakpoints for the spline(s).
33-
34- degree : int or list of ints
35- For each spline variable, the degree of the polynomial between
36- break points. If a single number is given and more than one
37- spline variable is specified, the same order is used for each
38- spline variable.
39-
40- smoothness : int or list of ints
41- For each spline variable, the smoothness at breakpoints (number
42- of derivatives that should match).
43-
44- vars : None or int, optional
45- The number of spline variables. If specified as None (default),
46- then the spline basis describes a single variable, with no
47- indexing. If the number of spine variables is > 0, then the
48- spline basis is index using the `var` keyword.
49-
50- """
45+ """Create a B-spline basis for piecewise smooth polynomials."""
5146 # Process the breakpoints for the spline */
5247 breakpoints = np .array (breakpoints , dtype = float )
5348 if breakpoints .ndim == 2 :
@@ -71,19 +66,19 @@ def __init__(self, breakpoints, degree, smoothness=None, vars=None):
7166 self .nvars = nvars
7267
7368 #
74- # Process B-spline parameters (order , smoothness)
69+ # Process B-spline parameters (degree , smoothness)
7570 #
7671 # B-splines are defined on a set of intervals separated by
7772 # breakpoints. On each interval we have a polynomial of a certain
78- # order and the spline is continuous up to a given smoothness at
73+ # degree and the spline is continuous up to a given smoothness at
7974 # breakpoints. The code in this section allows some flexibility in
8075 # the way that all of this information is supplied, including using
8176 # scalar values for parameters (which are then broadcast to each
8277 # output) and inferring values and dimensions from other
8378 # information, when possible.
8479 #
8580
86- # Utility function for broadcasting spline params (order , smoothness)
81+ # Utility function for broadcasting spline params (degree , smoothness)
8782 def process_spline_parameters (
8883 values , length , allowed_types , minimum = 0 ,
8984 default = None , name = 'unknown' ):
0 commit comments