mindspore.numpy.polyder

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) – Defaults to 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]