← Back
Editing: lambertw.cpython-311.pyc
� d�c� � �p � d Z ddlZ ddlZddlmZ n# e$ r Y nw xY wd� Zd� Z e dk r e � � dS dS )z�Compute a Pade approximation for the principal branch of the Lambert W function around 0 and compare it to various other approximations. � Nc �n � d� t d� � D � � } t j | dd� � \ }}||fS )Nc �P � g | ]#}t j t j d |�� � ��$S )r )�n)�mpmath�diff�lambertw)�.0r s �D/usr/lib/python3/dist-packages/scipy/special/_precompute/lambertw.py� <listcomp>z!lambertw_pade.<locals>.<listcomp> s+ � � E� E� E�q�f�k�&�/�1��2�2�2� E� E� E� � � � )�ranger �pade)�derivs�p�qs r � lambertw_pader s; � � E� E�E�!�H�H� E� E� E�F��;�v�q�!�$�$�D�A�q��a�4�Kr c �� � t t � � t j d� � 5 t � � \ } }| d d d� |d d d� }} t d� | � � � � t d� |� � � � d d d � � n# 1 swxY w Y t j ddd� � t j ddd� � }}t j ||� � \ }}|d|z z }g }|� � � D ]6}|� t t j |� � � � � � �7t j |� � � |j � � }t! j d d �� � \ }}t j d� | D � � � � } t j d � |D � � � � }t j | |� � t j ||� � z } t'