要使用 scipy
scipy.special.legendre(n)
>>> from scipy import special as spec
>>> spec.legendre(1)
poly1d([ 1., 0.])
>>> spec.legendre(2)
poly1d([ 1.5, 0. , -0.5])
>>> spec.legendre(3)
poly1d([ 2.50000000e+00, 2.77555756e-16, -1.50000000e+00,
-1.08840346e-16])
>>> from scipy import special as spec
>>> spec.legendre(1)
poly1d([ 1., 0.])
>>> spec.legendre(2)
poly1d([ 1.5, 0. , -0.5])
>>> spec.legendre(3)
poly1d([ 2.50000000e+00, 2.77555756e-16, -1.50000000e+00,
-1.08840346e-16])
沒有留言 :
張貼留言