Ë
    âQ(hw  ã                   óT   — 	 d dl Z	 d dlmZ d„ Zy# e$ r Y Œw xY w# e$ r Y d„ Zyw xY w)é    N©Úxc                 ó  ‡ — t        ‰ «      }t        ˆ fd„t        |«      D «       «      }t        |z  j	                  t        d|«      j                  «       }|dz  g}t        |«      D ]'  }|j                  |d   |z  j                  «       «       Œ) t        j                  d«      g}t        d|«      D ]0  }|j                  ||   j                  t        |dz
  «      |z  «       Œ2 |D �cg c]  }t        j                  |«      ‘Œ }}|S c c}w )a”  Given a series

    f(x) = a[1]*x + a[2]*x**2 + ... + a[n-1]*x**(n - 1),

    use the Lagrange inversion formula to compute a series

    g(x) = b[1]*x + b[2]*x**2 + ... + b[n-1]*x**(n - 1)

    so that f(g(x)) = g(f(x)) = x mod x**n. We must have a[0] = 0, so
    necessarily b[0] = 0 too.

    The algorithm is naive and could be improved, but speed isn't an
    issue here and it's easy to read.

    c              3   ó<   •K  — | ]  }‰|   t         |z  z  –— Œ y ­w)Nr   )Ú.0ÚiÚas     €ú]/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/scipy/special/_precompute/utils.pyú	<genexpr>z%lagrange_inversion.<locals>.<genexpr>   s   øè ø€ Ò(˜!ˆAˆa‰D”�A‘�IÑ(ùs   ƒr   éÿÿÿÿé   )ÚlenÚsumÚranger   ÚseriesÚremoveOÚappendÚexpandÚmpÚmpfÚcoeff)r	   ÚnÚfÚhÚhpowerÚkÚbr   s   `       r
   Úlagrange_inversionr      sé   ø€ ô  	ˆA‹€AÜÓ(œu Q›xÔ(Ó(€AÜ	
ˆ1‰�‰”Q˜˜1Ó×%Ñ%Ó'€AØ�‰dˆV€FÜ�1‹Xò /ˆØ�‰�v˜b‘z !‘|×+Ñ+Ó-Õ.ð/ä	�‰�‹ˆ€AÜ�1�a‹[ò .ˆØ	�‰�˜‘—‘¤ A¨¡EÓ*¨1Ñ,Õ-ð.àÖ�qŒ�‰��Ð€AÐØ€Hùò 	s   Ã*D
)Úmpmathr   ÚImportErrorÚ	sympy.abcr   r   © ó    r
   ú<module>r$      sF   ðð	Ûð	Ýó
øð ò 	Ùð	ûð
 ò 	Øóð		ús   ‚ ‡ ‘˜œ'¦'