lambertw
lambertw¶
- lambertw(z, k=- 1)[source]¶
Return \(w\) from the k’th branch of the LambertW function.
\[z = we^w, \qquad w = W_k(z).\]- Parameters
z (float, array_like) – Argument. You can assume that
z >= -exp(-1)and thatz <= 0ifk == -1. RaiseValueErrorotherwise (unless your code correctly extends \(W(z)\) to the complex plane).k ([0, -1]) – Branch. If
k == 0, then return the solution \(w>-1\), otherwise ifk == -1, return the solution \(w < -1\)
Notes
Do not use a canned implementation, even if you find one in SciPy. Write your own version.