mindspore.numpy.polyder

View Source On Gitee
mindspore.numpy.polyder(p, m=1)[source]

Returns the derivative of the specified order of a polynomial.

Note

Numpy object poly1d is currently not supported.

Parameters
  • p (Union[int, float, bool, list, tuple, Tensor) – Polynomial to differentiate. A sequence is interpreted as polynomial coefficients.

  • m (int, optional) – Default: 1 , order of differentiation.

Returns

Tensor, a new polynomial representing the derivative.

Raises

ValueError – If p has more than 1 dimensions.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore.numpy as np
>>> print(np.polyder([1, 1, 1, 1]))
[3 2 1]