mindspore.numpy.polyint
- mindspore.numpy.polyint(p, m=1, k=None)[源代码]
Returns an antiderivative (indefinite integral) of a polynomial.
说明
Numpy object poly1d is currently not supported.
- 参数
p (Union[int, float, bool, list, tuple, Tensor) – Polynomial to integrate. A sequence is interpreted as polynomial coefficients.
m (int, optional) – Defaults to 1, Order of the antiderivative.
k (Union[int, list of int]y, optinoal) – Integration constants. They are given in the order of integration: those corresponding to highest-order terms come first. If None (default), all constants are assumed to be zero. If
m = 1
, a single scalar can be given instead of a list.
- 返回
Tensor, a new polynomial representing the antiderivative.
- 异常
ValueError – If p has more than 1 dimensions.
- Supported Platforms:
Ascend
GPU
CPU
样例
>>> import mindspore.numpy as np >>> print(np.polyint([1, 1, 1])) [0.33333334 0.5 1. 0. ]