def get_quadrature_points(order):
"""
Returns the quadrature points for Gauss-Lobatto quadrature
as a function of the order of the polynomial we want to
represent.
See: https://en.wikipedia.org/wiki/Gaussian_quadrature
"""
return np.sort(np.concatenate((np.array([-1,1]),
poly.basis(order).deriv().roots())))
评论列表
文章目录