mindspore.numpy.polysub

mindspore.numpy.polysub(a1, a2)[源代码]

Difference (subtraction) of two polynomials. Given two polynomials a1 and a2, returns a1 - a2.

Note

Numpy object poly1d is currently not supported.

Parameters
Returns

Tensor, the difference of the inputs.

Raises

ValueError – If the input array has more than 1 dimensions.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore.numpy as np
>>> print(np.polysub([2, 10, -2], [3, 10, -4]))
[-1  0  2]