Builds an (n_param x n_param) P-spline penalty matrix.
Parameters:
d (int) – Integer, dimension of the matrix. Corresponds to the number of parameters in a P-spline.
diff (int) – Order of the differences used in constructing the penalty matrix. The default of diff=2 corresponds to the common P-spline default of penalizing second differences. (default: 2)