jax.numpy.polysub

Contents

jax.numpy.polysub#

jax.numpy.polysub(a1, a2)[source]#

Difference (subtraction) of two polynomials.

LAX-backend implementation of numpy.polysub().

Original docstring below.

Note

This forms part of the old polynomial API. Since version 1.4, the new polynomial API defined in numpy.polynomial is preferred. A summary of the differences can be found in the transition guide.

Given two polynomials a1 and a2, returns a1 - a2. a1 and a2 can be either array_like sequences of the polynomials’ coefficients (including coefficients equal to zero), or poly1d objects.

Parameters:
  • a1 (array_like or poly1d) – Minuend and subtrahend polynomials, respectively.

  • a2 (array_like or poly1d) – Minuend and subtrahend polynomials, respectively.

Returns:

out – Array or poly1d object of the difference polynomial’s coefficients.

Return type:

ndarray or poly1d