Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Module « numpy.matlib »

Fonction polysub - module numpy.matlib

Signature de la fonction polysub

def polysub(a1, a2) 

Description

help(numpy.matlib.polysub)

Difference (subtraction) of two polynomials.

.. 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
   :doc:`transition guide </reference/routines.polynomials>`.

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, a2 : array_like or poly1d
    Minuend and subtrahend polynomials, respectively.

Returns
-------
out : ndarray or poly1d
    Array or `poly1d` object of the difference polynomial's coefficients.

See Also
--------
polyval, polydiv, polymul, polyadd

Examples
--------
.. math:: (2 x^2 + 10 x - 2) - (3 x^2 + 10 x -4) = (-x^2 + 2)

>>> import numpy as np

>>> np.polysub([2, 10, -2], [3, 10, -4])
array([-1,  0,  2])



Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les fondamentaux
Voir le programme détaillé