mindspore.numpy.polyint(p, m=1, k=None)[source]

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.        ]