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 ? Programmation Python
Les compléments
Voir le programme détaillé
Module « scipy.special »

Fonction wrightomega - module scipy.special

Signature de la fonction wrightomega

def wrightomega(*args, **kwargs) 

Description

help(scipy.special.wrightomega)

wrightomega(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])

wrightomega(z, out=None)

Wright Omega function.

Defined as the solution to

.. math::

    \omega + \log(\omega) = z

where :math:`\log` is the principal branch of the complex logarithm.

Parameters
----------
z : array_like
    Points at which to evaluate the Wright Omega function
out : ndarray, optional
    Optional output array for the function values

Returns
-------
omega : scalar or ndarray
    Values of the Wright Omega function

See Also
--------
lambertw : The Lambert W function

Notes
-----
.. versionadded:: 0.19.0

The function can also be defined as

.. math::

    \omega(z) = W_{K(z)}(e^z)

where :math:`K(z) = \lceil (\Im(z) - \pi)/(2\pi) \rceil` is the
unwinding number and :math:`W` is the Lambert W function.

The implementation here is taken from [1]_.

References
----------
.. [1] Lawrence, Corless, and Jeffrey, "Algorithm 917: Complex
       Double-Precision Evaluation of the Wright :math:`\omega`
       Function." ACM Transactions on Mathematical Software,
       2012. :doi:`10.1145/2168773.2168779`.

Examples
--------
>>> import numpy as np
>>> from scipy.special import wrightomega, lambertw

>>> wrightomega([-2, -1, 0, 1, 2])
array([0.12002824, 0.27846454, 0.56714329, 1.        , 1.5571456 ])

Complex input:

>>> wrightomega(3 + 5j)
(1.5804428632097158+3.8213626783287937j)

Verify that ``wrightomega(z)`` satisfies ``w + log(w) = z``:

>>> w = -5 + 4j
>>> wrightomega(w + np.log(w))
(-5+4j)

Verify the connection to ``lambertw``:

>>> z = 0.5 + 3j
>>> wrightomega(z)
(0.0966015889280649+1.4937828458191993j)
>>> lambertw(np.exp(z))
(0.09660158892806493+1.4937828458191993j)

>>> z = 0.5 + 4j
>>> wrightomega(z)
(-0.3362123489037213+2.282986001579032j)
>>> lambertw(np.exp(z), k=1)
(-0.33621234890372115+2.282986001579032j)


Vous êtes un professionnel et vous avez besoin d'une formation ? Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé