要集成 Hermite_e 系列,请使用Python 中的 hermite_ 方法。第一个参数 c 是 Hermite_e 系列系数的数组。如果 c 是多维的,则不同的轴对应于不同的变量,每个轴的度数由相应的索引给出。e.hermeint()
第二个参数 m 是积分阶,必须为正。(默认值:1)。第三个参数 k 是积分constant(s)。lbnd 处的第一个整数的值是列表中的第一个值,lbnd 处的第二个整数的值是第二个值,依此类推。如果 k == [](默认值),所有常量都设置为零。如果 m == 1,则可以给出单个标量而不是列表。
第 4 个参数 lbnd 是积分的下界。(默认值:0)。第 5 个参数 scl 是一个标量。在每次积分之后,在添加积分常数之前,结果会乘以 scl。(默认值:1)。第 6 个参数,axis 是进行积分的 Axis。(默认值:0)。
脚步
首先,导入所需的库 -
import numpy as np fromnumpy.polynomialimport hermite_e as H
创建一个系数数组 -
c = np.array([1,2,3])
显示数组 -
print("Our Array...\n",c)
检查尺寸 -
print("\nDimensions of our Array...\n",c.ndim)
获取数据类型 -
print("\nDatatype of our Array object...\n",c.dtype)
获得形状 -
print("\nShape of our Array object...\n",c.shape)
要集成 Hermite_e 系列,请使用Python 中的 hermite_ 方法 -e.hermeint()
print("\nResult...\n",H.hermeint(c, m = 3))
示例
import numpy as np fromnumpy.polynomialimport hermite_e as H #创建一个系数数组 c = np.array([1,2,3]) #显示数组 print("Our Array...\n",c) #检查尺寸 print("\nDimensions of our Array...\n",c.ndim) #获取数据类型 print("\nDatatype of our Array object...\n",c.dtype) #获取形状 print("\nShape of our Array object...\n",c.shape) #要集成 Hermite_e 系列,请使用 Python 中的 hermite_e.hermeint() 方法 print("\nResult...\n",H.hermeint(c, m = 3))输出结果
Our Array... [1 2 3] Dimensions of our Array... 1 Datatype of our Array object... int64 Shape of our Array object... (3,) Result... [ 0.25 -0.25 0.5 0.16666667 0.08333333 0.05 ]