o
    Ö­j+  ã                   @   s`  d Z ddlZddlmZmZmZ ddlmZ ddlZddl	Z	ddl
mZ ddlmZ ddlmZmZmZmZ ddlmZmZmZmZmZmZmZmZmZmZ ddlm Z m!Z!m"Z"m#Z#m$Z$m%Z% zddl&Z&W n e'yq   ed	ƒZ&Y nw ee&d
ƒdd„ ƒZ(ee&dƒdd„ ƒZ)ee&dƒdd„ ƒZ*ee&dƒdd„ ƒZ+ee&dƒdd„ ƒZ,ee&dƒdd„ ƒZ-ee&dƒdd„ ƒZ.ee&dƒdd„ ƒZ/ee&dƒd d!„ ƒZ0ee&d"ƒej1j2d#d$„ ƒƒZ3ee&dƒd%d&„ ƒZ4ee&d'ƒd(d)„ ƒZ5ee&d'ƒd*d+„ ƒZ6d,Z7ee&dƒd-d.„ ƒZ8ee&dƒd/d0„ ƒZ9ee&dƒej1j2d1d2„ ƒƒZ:ee&dƒej1j2d3d4„ ƒƒZ;ee&dƒd5d6„ ƒZ<ee&dƒd7d8„ ƒZ=ee&dƒej1j2d9d:„ ƒƒZ>ee&dƒej1j2d;d<„ ƒƒZ?ee&dƒd=d>„ ƒZ@ee&dƒd?d@„ ƒZAee&dƒdAdB„ ƒZBdCdD„ ZCej1j2ee&dƒdEdF„ ƒƒZDej1j2ee&dƒdGdH„ ƒƒZEej1j2ee&dƒdIdJ„ ƒƒZFej1j2ee&dƒdKdL„ ƒƒZGeHdMdMdN�ZIej1j2ee&dOƒG dPdQ„ dQƒƒƒZJdS )Rz4
Test SciPy functions versus mpmath, if available.

é    N)Úassert_Úassert_allcloseÚsuppress_warnings)Úpi)Ú_pep440)ÚMissingModuleÚcheck_versionÚFuncDataÚassert_func_equal)
ÚArgÚFixedArgÚ
ComplexArgÚIntArgÚassert_mpmath_equalÚnonfunctional_tooslowÚ
trace_argsÚtime_limitedÚexception_to_nanÚ
inf_to_nan)Ú_sinpiÚ_cospiÚ_lgam1pÚ_lanczos_sum_expg_scaledÚ_log1pmxÚ	_igam_facÚmpmathz0.10c               	   C   s„   g } t  ddd¡D ]$}t  ddt j d¡D ]}|t  d| ¡ }|  |tt |¡ƒf¡ qq	t j	| t j
d�} ttj| ddƒ ¡  d S )	Ni�ÿÿÿé   é
   r   é   ù              ð?©Údtypeé   )ÚnpÚlogspaceÚlinspacer   ÚexpÚappendÚcomplexr   ÚeiÚarrayÚcdoubler	   ÚscÚexpiÚcheck)ÚdatasetÚrÚpÚz© r3   ú\/var/www/html/CropPilot/venv/lib/python3.10/site-packages/scipy/special/tests/test_mpmath.pyÚtest_expi_complex#   s   þr5   z0.19c                  C   sŽ   g } dD ]/}t  ddd¡D ]%}t d¡� |  ||tt ||¡ƒf¡ W d   ƒ n1 s-w   Y  qqt  | ¡} tt	j
| dddd	� ¡  d S )
N)é2   é3   r   é   éÈ   éd   ©r   r"   r   ç‚vIhÂ%<=©Úrtol)r#   r$   r   Úworkdpsr'   ÚfloatÚexpintÚasarrayr	   r,   Úexpnr.   )r/   ÚnÚxr3   r3   r4   Útest_expn_large_n3   s   ÿ€ÿ
rF   c                  C   s¨   g } g d¢}|D ]7}|D ]2}|D ]-}|d|  }t  d¡� tt  ||¡ƒ}W d   ƒ n1 s0w   Y  |  |||f¡ qqqt | ¡} tdd„ | dddd	� ¡  d S )
N)g     àXÀg      #Àç      à¿ç      à?g      #@g     àX@r   éx   c                 S   ó   t  | j|¡S ©N©r,   Úhyp0f1Úreal©Úvr2   r3   r3   r4   Ú<lambda>U   ó    z$test_hyp0f1_gh5764.<locals>.<lambda>r;   r   r<   r=   )	r   r?   r(   rM   r'   r#   r*   r	   r.   )r/   ÚaxisrP   rE   Úyr2   Úresr3   r3   r4   Útest_hyp0f1_gh5764D   s"   ÿùÿ
	ÿ
rV   c                  C   sF   t  ddd¡} t | d¡}t  dd„ | D ƒ¡}t|| t¡dd� d S )	Né–   é´   é   rH   c                 S   s   g | ]}t  |d ¡‘qS )rH   ©r   rM   )Ú.0rP   r3   r3   r4   Ú
<listcomp>^   ó    z'test_hyp0f1_gh_1609.<locals>.<listcomp>çê-�™—q=r=   )r#   r%   r,   rM   r*   r   Úastyper@   )ÚvvÚafÚmfr3   r3   r4   Útest_hyp0f1_gh_1609Y   s   rc   z1.1.0c                  C   sÚ   g } t  dd¡D ]6}t  ddd¡D ],}| }|  ||dtt ||d¡ƒf¡ | | d }|  ||dtt ||d¡ƒf¡ qqdD ]}dD ]}|  ||dtt ||d¡ƒf¡ qEqAt  | ¡} tt	j| dd	d
dd� 
¡  d S )Néûÿÿÿé   é   r   r"   )ç      %Àç      ø¿rG   r   rH   r"   r   )ç      ð¿rG   r   rH   r"   ç      ø?r   ç      @©r   r"   r   é   çVçž¯Ò<çê-�™—a=©r>   Úatol)r#   Úaranger%   r'   r@   r   Úhyperur*   r	   r,   r.   )r/   rD   ÚbÚar3   r3   r4   Útest_hyperu_around_0f   s    "ü"ÿ
rv   ú1.0.0c                     sx   ddg} | t tjg d¢dd�ƒ7 } dd„ | D ƒ} tdd	�‰ ‡ fd
d„| D ƒ}tj|tjd�}ttj	|dddd� 
¡  d S )N)r   éÿÿÿÿrx   çffffffæ?)r   éþÿÿÿrz   ry   )r   r"   gffffffæ¿éüÿÿr8   )Úrepeatc                 S   sD   g | ]\}}}}||krt |ƒ|kr|d k r|dkr||||f‘qS )r   r{   )Úround)r[   ru   rt   ÚcrE   r3   r3   r4   r\   „   s
    
$
ÿz.test_hyp2f1_strange_points.<locals>.<listcomp>T)Ú	eliminatec                    s&   g | ]}|t tj|i ˆ ¤Žƒf ‘qS r3   ©r@   r   Úhyp2f1©r[   r1   ©Úkwr3   r4   r\   ‰   s   & r    ©r   r"   r   rm   ç»½×Ùß|Û=r=   )ÚlistÚ	itertoolsÚproductÚdictr#   r*   Úfloat64r	   r,   r�   r.   ©Úptsr/   r3   rƒ   r4   Útest_hyp2f1_strange_points}   s   þÿ
rŽ   z0.13c                  C   sp   g d¢} dd„ | D ƒ}t j|t jd�}t jdd�� ttj|ddd	d
� ¡  W d   ƒ d S 1 s1w   Y  d S )N)©r"   r   rm   r   )çUUUUUUÕ?gUUUUUUå?g«ªªªªªê?g      ë?)ç      Ð?rH   g      è?gX¤<Ýšï?)r   rz   éýÿÿÿrm   )r   r’   rz   rm   )r   rh   rh   rm   r�   )gôýÔxé&ç?rx   rd   g333333Ó?)r‘   r�   r   ç+‡ÙÎ÷ï?)r‘   r�   r   rx   )r   rm   re   ç®Gáz®ï?)rj   rG   rm   r”   )r   rk   g      
Àr“   )éøÿÿÿg*4 ]92@g|¼ÌÁOœ%@gC†Žuˆí?)éöÿÿÿé„  rg   r”   )r–   r—   ç      %@r”   )rx   r   r"   ç      ð?)rx   r   r"   ri   )r’   é   re   r™   )r’   rš   re   ri   )rH   g     ØpÀrj   gmËŸïï?c                 S   s    g | ]}|t tj|Ž ƒf ‘qS r3   r€   r‚   r3   r3   r4   r\   ¨   ó     z0test_hyp2f1_real_some_points.<locals>.<listcomp>r    Úignore©Úinvalidr…   r8   r†   r=   )r#   r*   r‹   Úerrstater	   r,   r�   r.   rŒ   r3   r3   r4   Útest_hyp2f1_real_some_points�   s   "ÿr    ú0.14c                     sN   g d¢} dd„ ‰ ‡ fdd„| D ƒ}t j|t jd�}ttj|ddd	d
� ¡  d S )N))ép   )r7   r   )é÷ÿÿÿr   gwJëÿï¿)r   é|üÿÿr˜   r”   )r   r¤   rg   r”   c                 S   s"   t | tƒrt| d ƒ| d  S | S )Nr   r"   )Ú
isinstanceÚtupler@   ©rE   r3   r3   r4   Úfev¹   s   
z&test_hyp2f1_some_points_2.<locals>.fevc                    s*   g | ]}t tˆ |ƒƒttj|Ž ƒf ‘qS r3   )r¦   Úmapr@   r   r�   r‚   ©r¨   r3   r4   r\   ¿   ó   * z-test_hyp2f1_some_points_2.<locals>.<listcomp>r    r…   r8   r†   r=   )r#   r*   r‹   r	   r,   r�   r.   rŒ   r3   rª   r4   Útest_hyp2f1_some_points_2¯   s
   r¬   c                  C   sÈ   g } dD ]1}dD ],}dD ]'}dD ]"}zt t ||||¡ƒ}W n	 ty'   Y qw |  |||||f¡ qqqqtj| tjd�} tjdd�� t	t
j| dd	d
dd� ¡  W d   ƒ d S 1 s]w   Y  d S )N)r–   rd   çÍÌÌÌÌÌü¿gÍÌÌÌÌÌü?re   r   )g      Àrx   r"   gš™™™™™@)r£   r­   re   gffffff4@)r–   g)\�Âõ(ð¿ç®Gáz®ï¿r   g333333ã?gffffffî?rj   r   r    rœ   r�   r…   r8   ç•Ö&è.>T©r>   Úignore_inf_sign)r@   r   r�   Ú	Exceptionr'   r#   r*   r‹   rŸ   r	   r,   r.   )r/   ru   rt   r~   r2   rP   r3   r3   r4   Útest_hyp2f1_real_someÅ   s*   ÿûÿÿÿ"þr³   z0.12c                  C   sˆ  d} t  | dft j¡}t j d¡ t j d| ¡|d d …df< t j d| ¡|d d …df< t j d| ¡|d d …df< dt j | ¡ d |d d …df< |d d …df  d	t j d| ¡ 9  < |d d …df  d	t j d| ¡ 9  < |d d …df  d	t j d| ¡ 9  < |D ]2}tj	d
k r¦t
|d d… ƒ ¡ t
|d ƒkr¦t
|d d… ƒ ¡ |d< ttjt|d d… ƒŽ ƒ|d< qƒttj|dddd� ¡  d S )Néô  re   éÒ  rj   r   r"   r   rm   rx   r¡   r8   r…   r¯   r=   )r#   Úzerosr‹   ÚrandomÚseedÚparetoÚrandÚrandintr   Ú__version__ÚabsÚmaxr@   r�   r¦   r	   r,   r.   )Únpointsr/   Údsr3   r3   r4   Útest_hyp2f1_real_randomØ   s     &&&
  rÁ   c               	   C   sð   t jjt jj} }zddt j_t t ddd¡t ddd¡¡\}}t t ddd¡t ddd¡¡\}}tj| 	¡ | 	¡ f dtj| 	¡ | 	¡ f   }t
tjd	d
„ |ddd� t
tjdd
„ |ddd� W | |t j_t j_d S | |t j_t j_w )NéF   r–   r"   é   é   i°ÿÿÿgš™™™™™é?r   c                 S   ó   t t | ¡ƒS rK   )r(   r   Úerfr§   r3   r3   r4   rQ      rR   z"test_erf_complex.<locals>.<lambda>Fr<   ©Ú
vectorizedr>   c                 S   rÅ   rK   )r(   r   Úerfcr§   r3   r3   r4   rQ     rR   )r   ÚmpÚdpsÚprecr#   Úmeshgridr%   r$   Úr_Úravelr
   r,   rÆ   rÉ   )Úold_dpsÚold_precÚx1Úy1Úx2Úy2Úpointsr3   r3   r4   Útest_erf_complexö   s   $$0ÿÿ*r×   z0.15c                     sd  g } dD ]o}|   dd|fdd|fdd|fdd|fdd|fdd|fdd|fdd|fdd|fdd	|fd
d|fdd	|fdd|fdd	|fd
d|fdd|fdd|fdd|fd
d|fdd|fdd|fdd|fd
d|fdd|fdd|fdd|fg¡ qdd„ ‰ ‡ fdd„| D ƒ}tj|tjd�}dd„ }tjdd�� t||dd
dd d!� ¡  W d   ƒ d S 1 s«w   Y  d S )"N)r®   gmçû©ñÒá¿ç�íµ ÷Æ°>gL7‰A`åÀ?r"   r"   rx   rz   g333333û?g333333û¿gš™™™™™Àr   rÄ   rm   é   re   r’   rd   r•   iõÿÿÿgš™™™™™ @gš™™™™™&@gš™™™™™ Àgš™™™™™&Àc                 S   s2   |t |ƒkr|dkr|dkrdS dS t | ||¡S ©Nr"   r   )Úintr   Úlegenp)ÚnuÚmurE   r3   r3   r4   Úmplegenp-  s
   ztest_lpmv.<locals>.mplegenpc                    s*   g | ]}|ˆ |d  |d |d ƒf ‘qS )r"   r   r   r3   r‚   ©rß   r3   r4   r\   6  r«   ztest_lpmv.<locals>.<listcomp>r    c                 S   s   t  |  t¡||¡S rK   )r,   Úlpmvr_   rÛ   )rÞ   rÝ   rE   r3   r3   r4   Úevf9  ó   ztest_lpmv.<locals>.evfrœ   r�   rl   r†   ç›+¡†›„=rp   )Úextendr#   r*   r‹   rŸ   r	   r.   )r�   rE   r/   râ   r3   rà   r4   Ú	test_lpmv  sJ   æ	"ÿræ   c                  C   s  t j d¡ t jt  ddd¡t  ddd¡t  ddd¡t  dd	d¡t  dd	d¡d
 dddddf
 } | }t  t  |d d …d f | d d d …f ¡¡ dd¡j	}t
jjt
jj}}z)dt
j_ttjdd„ |dddd� ttjdd„ |ddd� W ||t
j_t
j_d S ||t
j_t
j_w )Nrµ   é8ÿÿÿr9   r8   r–   r   rx   r"   rÄ   rH   gffffffÀr’   g33333YÀg3333³‰ÃÀr   é�  c                 S   s   t t | |¡ƒS rK   )r@   r   Úbeta©ru   rt   r3   r3   r4   rQ   W  ó    ztest_beta.<locals>.<lambda>Fr†   T)rÈ   r>   r±   c                 S   s   t t tt | |¡ƒ¡ƒS rK   )r@   r   Úlogr½   ré   rê   r3   r3   r4   rQ   _  ó    rÇ   )r#   r·   r¸   rÎ   r$   rr   r*   Úbroadcast_arraysÚreshapeÚTr   rÊ   rË   rÌ   r
   r,   ré   Úbetaln)rt   ru   ÚabrÐ   rÑ   r3   r3   r4   Ú	test_betaD  s8   
û4ûû*ró   gš™™™™™É?c                  C   s–   t t g d¢¡ } t ddtj d¡}t | |¡\} }| t d| ¡ }tjd| d| f  ¡ }dd„ |D ƒ}t |¡}t	t
j|ddd	d
� ¡  d S )N)gš™™™™™¹¿g{®Gáz„¿r   g{®Gáz„?gš™™™™™¹?r   r   rf   r   r"   c                 S   ó   g | ]}|t t |¡ƒf‘qS r3   ©r(   r   Úloggamma©r[   Úz0r3   r3   r4   r\   y  ó    z3test_loggamma_taylor_transition.<locals>.<listcomp>ç‚vIhÂ%,=r=   )ÚLOGGAMMA_TAYLOR_RADIUSr#   r*   r%   r   rÍ   r&   rÎ   Úflattenr	   r,   rö   r.   ©r0   ÚthetaÚdzr2   r/   r3   r3   r4   Útest_loggamma_taylor_transitionn  s   
r   c                  C   s˜   t  dt  t¡d¡} t  ddt j d¡}t  | |¡\} }| t  d| ¡ }t jd| d| f  	¡ }dd	„ |D ƒ}t  
|¡}ttj|ddd
d� ¡  d S )Niðÿÿÿr   r   r   rf   r   r"   c                 S   rô   r3   rõ   r÷   r3   r3   r4   r\   ‰  rù   z(test_loggamma_taylor.<locals>.<listcomp>rú   r=   )r#   r$   Úlog10rû   r%   r   rÍ   r&   rÎ   rü   r*   r	   r,   rö   r.   rý   r3   r3   r4   Útest_loggamma_taylor  s   
r  c                  C   sÚ   t jt  ddd¡ dt  ddd¡f } |  ¡ }t  | |¡\} }| d|  }t  ddd¡ ddd¡}|t  |f|j ¡  	¡ }t
 d¡� d	d
„ |D ƒ}W d   ƒ n1 sUw   Y  t  |¡}ttj|dddd� ¡  d S )Nrx   éóÿÿÿrm   r   r   iVÿÿÿr"   r:   c                 S   rô   r3   )r(   r   Úrgammar÷   r3   r3   r4   r\   ¢  rù   z%test_rgamma_zeros.<locals>.<listcomp>r^   r=   )r#   rÎ   r$   ÚcopyrÍ   rr   rï   ÚdstackÚsizerü   r   r?   r*   r	   r,   r  r.   )ÚdxÚdyrÿ   r¶   r2   r/   r3   r3   r4   Útest_rgamma_zeros“  s   &ÿ
r
  c               	   C   s  t  t jd¡} t| ƒg}t  t jd¡} | t| ƒ¡ t |¡}tjdt ddd¡ dt ddd¡df }| 	¡ }t 
||¡\}}|d	|  }|t |f|j ¡  ¡ }t  d
¡� dd„ |D ƒ}W d   ƒ n1 sjw   Y  t |¡}ttj|dddd� ¡  d S )Nrj   rG   g¸…ëQ¸Î¿rx   éñÿÿÿr   r   g¸…ëQ¸Î?r   r   c                 S   rô   r3   ©r(   r   Údigammar÷   r3   r3   r4   r\   ½  rù   z&test_digamma_roots.<locals>.<listcomp>r"   rä   r=   )r   Úfindrootr  r@   r'   r#   r*   rÎ   r$   r  rÍ   r  r  rü   r?   r	   r,   r.   )ÚrootÚrootsr  r	  rÿ   r2   r/   r3   r3   r4   Útest_digamma_roots¬  s   

*ÿ
r  c                     sÂ   t tjƒ‰ t ddd¡ } tjt ddd¡ dt ddd¡f }t | |¡\} }| d|   ¡ }t d¡� ‡ fd	d
„|D ƒ}W d   ƒ n1 sIw   Y  t 	|¡}t
tj|dddd� ¡  d S )Né,  éâÿÿÿr:   r   r’   re   r   é(   c                    s   g | ]
}|t ˆ |ƒƒf‘qS r3   )r(   r÷   ©r  r3   r4   r\   Ñ  ó    z(test_digamma_negreal.<locals>.<listcomp>r"   r<   r=   )r   r   r  r#   r$   rÎ   rÍ   rü   r?   rB   r	   r,   r.   ©rE   rT   r2   r/   r3   r  r4   Útest_digamma_negrealÃ  s   
&ÿ
r  c                  C   sœ   t  ddd¡ } t  g d¢¡}t  | |¡\} }| d|   ¡ }t d¡� dd„ |D ƒ}W d   ƒ n1 s6w   Y  t  |¡}tt	j
|d	d
dd� ¡  d S )Nr  r  r:   )gffffffÀgš™™™™™Àgš™™™™™@gffffff@r   r   c                 S   rô   r3   r  r÷   r3   r3   r4   r\   â  rù   z)test_digamma_boundary.<locals>.<listcomp>r   r"   r<   r=   )r#   r$   r*   rÍ   rü   r   r?   rB   r	   r,   r  r.   r  r3   r3   r4   Útest_digamma_boundary×  s   ÿ
r  c                  C   s¨   d} t  d|  d|  d¡}| ¡ }t  ||¡\}}| ¡ | ¡ }}t d¡� dd„ t||ƒD ƒ}W d   ƒ n1 s<w   Y  t  |¡}t	t
j|ddd	d
� ¡  d S )Nrf   rH   r   r6   r:   c              
   S   s*   g | ]\}}||t tj||d d�ƒf‘qS )T©rt   Úregularized)r@   r   Úgammainc)r[   Úa0Úx0r3   r3   r4   r\   ö  s    ÿz*test_gammainc_boundary.<locals>.<listcomp>r;   r^   r=   )r#   r%   r  rÍ   rü   r   r?   Úzipr*   r	   r,   r  r.   )Úsmallru   rE   r/   r3   r3   r4   Útest_gammainc_boundaryì  s   ÿÿ
r!  c                     sv   dd„ ‰ t  dd¡} t  ddt ¡}dt  | t  d| ¡¡  ¡ }t  ‡ fd	d
„|D ƒ¡}ttj	|dddd� 
¡  d S )Nc                 S   s   t t dd|  ¡ƒS ©Nr   r"   )r(   r   Úpolylog©r2   r3   r3   r4   Úspence  rã   z"test_spence_circle.<locals>.spencerH   rj   r   r   r"   r   c                    s   g | ]}|ˆ |ƒf‘qS r3   r3   r÷   ©r%  r3   r4   r\     r]   z&test_spence_circle.<locals>.<listcomp>rä   r=   )r#   r%   r   Úouterr&   rü   rB   r	   r,   r%  r.   )r0   rþ   r2   r/   r3   r&  r4   Útest_spence_circle  s   r(  c                  C   sº   t  t¡j} t jt  ddd¡ dt  ddd¡f }| ¡ }t  ||¡\}}|d|  }t  ddd¡ 	ddd¡}|t  
|f|j ¡  ¡ }t  d	d
„ |D ƒ¡}tt|ddd|  d� ¡  d S )Nr   r  rm   r   éœÿÿÿr:   r"   rx   c                 S   rô   r3   )r(   r   Úsinpir÷   r3   r3   r4   r\     ó    ÿz$test_sinpi_zeros.<locals>.<listcomp>r   r=   )r#   Úfinfor@   ÚepsrÎ   r$   r  rÍ   rr   rï   r  r  rü   rB   r	   r   r.   ©r-  r  r	  rÿ   r¶   r2   r/   r3   r3   r4   Útest_sinpi_zeros  s   &
ÿr/  c                  C   s¾   t  t¡j} t jt  ddd¡ dt  ddd¡f }| ¡ }t  ||¡\}}|d|  }t  ddd¡d  	ddd	¡}|t  
|f|j ¡  ¡ }t  d
d„ |D ƒ¡}tt|ddd|  d� ¡  d S )Nr   r  rm   r   r)  r:   r"   rH   rx   c                 S   rô   r3   )r(   r   Úcospir÷   r3   r3   r4   r\   -  r+  z$test_cospi_zeros.<locals>.<listcomp>r   r=   )r#   r,  r@   r-  rÎ   r$   r  rÍ   rr   rï   r  r  rü   rB   r	   r   r.   r.  r3   r3   r4   Útest_cospi_zeros$  s   &
ÿr1  c            	   	   C   s¬   dd„ } dd„ }t  ddd¡}t jt  dd	d
¡ dt  d	dd
¡f }g }|D ]}tt |¡ƒ}|D ]}|| }| |||||ƒf¡ q1q&t  |¡}t	| |dddd� 
¡  d S )Nc                 S   ó   t  | |¡d S ©Nr   ©r,   Úellipj©ÚuÚmr3   r3   r4   Údn9  ó   z"test_dn_quarter_period.<locals>.dnc                 S   s   t tjd| |d�ƒS ©Nr9  r6  )r@   r   Úellipfunr6  r3   r3   r4   Ú	mpmath_dn<  rã   z)test_dn_quarter_period.<locals>.mpmath_dnr   r"   rf   rx   r  r   r;   r   r†   r=   )r#   r%   rÎ   r$   r@   r   Úellipkr'   rB   r	   r.   )	r9  r=  r8  Údur/   Úm0Úu0Údu0r1   r3   r3   r4   Útest_dn_quarter_period7  s   &þ
rC  c                 C   sh   t  |¡�% t  | ¡} t  | jt j dt j  ¡}t  t  | ¡|¡}W d   ƒ |S 1 s-w   Y  |S r3  )r   r?   ÚmpcÚceilÚimagr   Úlambertwr&   )r2   rË   ÚunwindrU   r3   r3   r4   Ú_mpmath_wrightomegaP  s   

ýürI  c            	      C   s4  t  ddd¡ } t  t jt j¡g}t  t jt j ¡g}t  t j t j¡g}t  t j t j ¡g}tdƒD ]4}| t  |d t j¡¡ | t  |d t j ¡¡ | t  |d t j¡¡ | t  |d t j ¡¡ q4t  ||||f¡}t  | |¡\} }| d|   	¡ }t  
dd„ |D ƒ¡}ttj|dd	d
d� ¡  d S )Nr   r   é   r6   rx   r   c                 S   ó   g | ]}|t t|d ƒƒf‘qS ©rJ  ©r(   rI  r÷   r3   r3   r4   r\   i  r+  z+test_wrightomega_branch.<locals>.<listcomp>r"   ç:Œ0âŽyE>r=   )r#   r$   Ú	nextafterr   ÚinfÚranger'   ÚhstackrÍ   rü   rB   r	   r,   Úwrightomegar.   )	rE   Úpicut_aboveÚpicut_belowÚnpicut_aboveÚnpicut_belowÚirT   r2   r/   r3   r3   r4   Útest_wrightomega_branchX  s"   
ÿrY  c                  C   sn   t  dd¡} t  ddt j ¡}t  | |¡\} }| d|   ¡ }t  dd„ |D ƒ¡}ttj|dddd	� 	¡  d S )
Nrz   r"   r   r   c                 S   rK  rL  rM  r÷   r3   r3   r4   r\   x  r+  z,test_wrightomega_region1.<locals>.<listcomp>r   rn   r=   ©
r#   r%   r   rÍ   rü   rB   r	   r,   rS  r.   r  r3   r3   r4   Útest_wrightomega_region1o  ó   
ÿr[  c                  C   sn   t  dd¡} t  dt j d¡}t  | |¡\} }| d|   ¡ }t  dd„ |D ƒ¡}ttj|dddd	� 	¡  d S )
Nrz   r"   rx   r   c                 S   rK  rL  rM  r÷   r3   r3   r4   r\   ‡  r+  z,test_wrightomega_region2.<locals>.<listcomp>r   rn   r=   rZ  r  r3   r3   r4   Útest_wrightomega_region2~  r\  r]  c                  C   sn   t  ddd¡t  ddd¡} }t  | |¡\} }| d|   ¡ }t  dd„ |D ƒ¡}ttj|dddd	� ¡  d S )
Nrx   r"   rJ  r   c                 S   rô   r3   )r(   r   rG  r÷   r3   r3   r4   r\   ˜  r+  z(test_lambertw_smallz.<locals>.<listcomp>r   r<   r=   )	r#   r%   rÍ   rü   rB   r	   r,   rG  r.   r  r3   r3   r4   Útest_lambertw_smallz‘  s   
ÿr^  r9   ©ÚmaxprecÚmaxtermsz0.17c                   @   sÄ  e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd „ Zd!d"„ Zd#d$„ Zd%d&„ Zd'd(„ Zd)d*„ Zd+d,„ Zd-d.„ Zd/d0„ Zd1d2„ Zd3d4„ Zejjd5d6d7�d8d9„ ƒZ d:d;„ Z!ejjd5d6d7�d<d=„ ƒZ"d>d?„ Z#d@dA„ Z$dBdC„ Z%dDdE„ Z&dFdG„ Z'dHdI„ Z(dJdK„ Z)dLdM„ Z*dNdO„ Z+dPdQ„ Z,dRdS„ Z-dTdU„ Z.dVdW„ Z/dXdY„ Z0dZd[„ Z1d\d]„ Z2d^d_„ Z3d`da„ Z4dbdc„ Z5ddde„ Z6dfdg„ Z7dhdi„ Z8djdk„ Z9dldm„ Z:dndo„ Z;dpdq„ Z<drds„ Z=dtdu„ Z>dvdw„ Z?dxdy„ Z@dzd{„ ZAd|d}„ ZBd~d„ ZCd€d�„ ZDd‚dƒ„ ZEd„d…„ ZFd†d‡„ ZGdˆd‰„ ZHdŠd‹„ ZIdŒd�„ ZJdŽd�„ ZKd�d‘„ ZLd’d“„ ZMd”d•„ ZNd–d—„ ZOd˜d™„ ZPejjd5dš�d›dœ„ ƒZQd�dž„ ZRejjd5dš�dŸd „ ƒZSeTd¡d¢„ ƒZUd£d¤„ ZVd¥d¦„ ZWejjd5d§d7�d¨d©„ ƒZXdªd«„ ZYd¬d­„ ZZd®d¯„ Z[ejjd5dš�d°d±„ ƒZ\eTd²d³„ ƒZ]ejjd5dš�d´dµ„ ƒZ^ej _d¶¡d·d¸„ ƒZ`d¹dº„ Zad»d¼„ Zbejjd5dš�d½d¾„ ƒZcd¿dÀ„ ZddÁdÂ„ ZedÃdÄ„ ZfeTdÅdÆ„ ƒZgdÇdÈ„ Zhej _dÉ¡dÊdË„ ƒZidÌdÍ„ ZjeTdÎdÏ„ ƒZkdÐdÑ„ ZldÒdÓ„ ZmdÔdÕ„ ZndÖd×„ Zoejjd5dØd7�dÙdÚ„ ƒZpeTdÛdÜ„ ƒZqdÝdÞ„ Zrdßdà„ Zsejjd5dš�dádâ„ ƒZtejjd5dãd7�dädå„ ƒZudædç„ Zvejjd5dèd7�dédê„ ƒZwdëdì„ Zxdídî„ Zyejjdïdð�dñdò„ ƒZzdódô„ Z{dõdö„ Z|d÷dø„ Z}dùdú„ Z~dûdü„ Zdýdþ„ Z€dÿ�d „ Z��d�d„ Z‚�d�d„ Zƒ�d�d„ Z„�d�d„ Z…�d	�d
„ Z†�d�d„ Z‡�d�d„ Zˆ�d�d„ Z‰�d�d„ ZŠ�d�d„ Z‹�d�d„ ZŒ�d�d„ Z��d�d„ ZŽ�d�d„ Z��d�d„ Z��d�d „ Z‘�d!�d"„ Z’�d#�d$„ Z“ejjd5�d%d7��d&�d'„ ƒZ”�d(S ()  ÚTestSystematicc                 C   s<   t dd„ tjtddƒgdd� t dd„ tjtdd	ƒgƒ d S )
Nc                 S   ó   t  | ¡d S ©Nr   ©r,   Úairyr$  r3   r3   r4   rQ   ³  rR   z,TestSystematic.test_airyai.<locals>.<lambda>ç    „×—Áç    „×—Açñhãˆµøä>r=   c                 S   rc  rd  re  r$  r3   r3   r4   rQ   ·  rR   ç     @�Àç     @�@)r   r   Úairyair   ©Úselfr3   r3   r4   Útest_airyai±  s   
ý
þzTestSystematic.test_airyaic                 C   s   t dd„ tjtƒ gƒ d S )Nc                 S   rc  rd  re  r$  r3   r3   r4   rQ   ¼  rR   z4TestSystematic.test_airyai_complex.<locals>.<lambda>)r   r   rl  r   rm  r3   r3   r4   Útest_airyai_complex»  s   þz"TestSystematic.test_airyai_complexc                 C   ó@   t dd„ dd„ tddƒgdd� t dd„ d	d„ td
dƒgƒ d S )Nc                 S   rc  ©Nr"   re  r$  r3   r3   r4   rQ   Â  rR   z2TestSystematic.test_airyai_prime.<locals>.<lambda>c                 S   ó   t j| dd�S ©Nr"   )Ú
derivative©r   rl  r$  r3   r3   r4   rQ   Â  ó   rg  rh  ri  r=   c                 S   rc  rr  re  r$  r3   r3   r4   rQ   Æ  rR   c                 S   rs  rt  rv  r$  r3   r3   r4   rQ   Æ  rw  rj  rk  ©r   r   rm  r3   r3   r4   Útest_airyai_primeÀ  ó   
ý
þz TestSystematic.test_airyai_primec                 C   ó   t dd„ dd„ tƒ gƒ d S )Nc                 S   rc  rr  re  r$  r3   r3   r4   rQ   Ë  rR   z:TestSystematic.test_airyai_prime_complex.<locals>.<lambda>c                 S   rs  rt  rv  r$  r3   r3   r4   rQ   Ë  rw  ©r   r   rm  r3   r3   r4   Útest_airyai_prime_complexÊ  ó   þz(TestSystematic.test_airyai_prime_complexc                 C   rq  )Nc                 S   rc  r3  re  r$  r3   r3   r4   rQ   Ñ  rR   z,TestSystematic.test_airybi.<locals>.<lambda>c                 S   ó
   t  | ¡S rK   ©r   Úairybir$  r3   r3   r4   rQ   Ñ  ó   
rg  rh  ri  r=   c                 S   rc  r3  re  r$  r3   r3   r4   rQ   Õ  rR   c                 S   r  rK   r€  r$  r3   r3   r4   rQ   Õ  r‚  rj  rk  rx  rm  r3   r3   r4   Útest_airybiÏ  rz  zTestSystematic.test_airybic                 C   r{  )Nc                 S   rc  r3  re  r$  r3   r3   r4   rQ   Ú  rR   z4TestSystematic.test_airybi_complex.<locals>.<lambda>c                 S   r  rK   r€  r$  r3   r3   r4   rQ   Ú  r‚  r|  rm  r3   r3   r4   Útest_airybi_complexÙ  r~  z"TestSystematic.test_airybi_complexc                 C   rq  )Nc                 S   rc  ©Nrm   re  r$  r3   r3   r4   rQ   à  rR   z2TestSystematic.test_airybi_prime.<locals>.<lambda>c                 S   rs  rt  r€  r$  r3   r3   r4   rQ   à  rw  rg  rh  ri  r=   c                 S   rc  r…  re  r$  r3   r3   r4   rQ   ä  rR   c                 S   rs  rt  r€  r$  r3   r3   r4   rQ   ä  rw  rj  rk  rx  rm  r3   r3   r4   Útest_airybi_primeÞ  rz  z TestSystematic.test_airybi_primec                 C   r{  )Nc                 S   rc  r…  re  r$  r3   r3   r4   rQ   é  rR   z:TestSystematic.test_airybi_prime_complex.<locals>.<lambda>c                 S   rs  rt  r€  r$  r3   r3   r4   rQ   é  rw  r|  rm  r3   r3   r4   Útest_airybi_prime_complexè  r~  z(TestSystematic.test_airybi_prime_complexc                 C   ó"   t tjtdd„ ƒtddƒgƒ d S )Nc                 S   ó   t jd| fi t¤ŽS rd  )r   ÚbeiÚHYPERKWr$  r3   r3   r4   rQ   ï  ó    z)TestSystematic.test_bei.<locals>.<lambda>rj  rk  )r   r,   rŠ  r   r   rm  r3   r3   r4   Útest_beií  ó   

þzTestSystematic.test_beic                 C   rˆ  )Nc                 S   r‰  rd  )r   Úberr‹  r$  r3   r3   r4   rQ   ô  rŒ  z)TestSystematic.test_ber.<locals>.<lambda>rj  rk  )r   r,   r�  r   r   rm  r3   r3   r4   Útest_berò  rŽ  zTestSystematic.test_berc                 C   s&   t dd„ dd„ tddƒgddd� d S )Nc                 S   s   t  t| ƒ¡t| ƒ S rK   )r,   Ú	bernoullirÛ   ©rD   r3   r3   r4   rQ   ø  ó    z/TestSystematic.test_bernoulli.<locals>.<lambda>c                 S   s   t t t| ƒ¡ƒS rK   )r@   r   r‘  rÛ   r’  r3   r3   r4   rQ   ù  ó    r   iÈ2  r¯   ©r>   rD   )r   r   rm  r3   r3   r4   Útest_bernoulli÷  s
   

ýzTestSystematic.test_bernoullic                 C   s*   t tjtdd„ ƒtddƒtƒ gdd� d S )Nc                 S   ó   t j| |fi t¤ŽS rK   ©r   Úbesselir‹  rO   r3   r3   r4   rQ      rŒ  z-TestSystematic.test_besseli.<locals>.<lambda>ç}Ã”%­I²Ôç}Ã”%­I²TgJD¼îÉçà©rq   )r   r,   Úivr   r   rm  r3   r3   r4   Útest_besseliý  s   

üzTestSystematic.test_besselic                 C   ó(   t dd„ tdd„ ƒtddƒtƒ gƒ d S )Nc                 S   rJ   rK   )r,   r�  rN   rO   r3   r3   r4   rQ     rR   z5TestSystematic.test_besseli_complex.<locals>.<lambda>c                 S   r—  rK   r˜  rO   r3   r3   r4   rQ     rŒ  rš  r›  ©r   r   r   r   rm  r3   r3   r4   Útest_besseli_complex  ó
   
ýz#TestSystematic.test_besseli_complexc                 C   sZ   t tjtdd„ ƒtddƒtddƒgdd� t tjtd	d„ ƒtddƒtd
dƒgddd� d S )Nc                 S   r—  rK   ©r   Úbesseljr‹  rO   r3   r3   r4   rQ     rŒ  z-TestSystematic.test_besselj.<locals>.<lambda>rš  r›  rj  rk  T©r±   c                 S   r—  rK   r£  rO   r3   r3   r4   rQ     rŒ  rg  rh  ri  )r±   r>   )r   r,   Újvr   r   rm  r3   r3   r4   Útest_besselj  s   
ü

ûzTestSystematic.test_besseljc                 C   s$   t dd„ tdd„ ƒtƒ tƒ gƒ d S )Nc                 S   rJ   rK   )r,   r¦  rN   rO   r3   r3   r4   rQ     rR   z5TestSystematic.test_besselj_complex.<locals>.<lambda>c                 S   r—  rK   r£  rO   r3   r3   r4   rQ      rŒ  r   rm  r3   r3   r4   Útest_besselj_complex  s
   

ýz#TestSystematic.test_besselj_complexc                 C   s,   t tjtjtddƒtdtjƒgddd� d S ©Nrç   r9   r   Fr^   ©Únan_okr>   )r   r,   Úkvr   Úbesselkr   r#   rP  rm  r3   r3   r4   Útest_besselk$  ó   
ûzTestSystematic.test_besselkc                 C   s,   t tjtjtddƒtdtjƒgddd� d S r©  )	r   r,   Úknr   r­  r   r   r#   rP  rm  r3   r3   r4   Útest_besselk_int-  r¯  zTestSystematic.test_besselk_intc                 C   rŸ  )Nc                 S   rJ   rK   )r,   r¬  rN   rO   r3   r3   r4   rQ   8  rR   z5TestSystematic.test_besselk_complex.<locals>.<lambda>c                 S   r—  rK   )r   r­  r‹  rO   r3   r3   r4   rQ   9  rŒ  rš  r›  r   rm  r3   r3   r4   Útest_besselk_complex6  r¢  z#TestSystematic.test_besselk_complexc                 C   s2   dd„ }t tjt|ƒtddƒtddƒgdd� d S )	Nc                 S   sR   t tj| |fi t¤Žƒ}t|ƒdkrtjt |¡ }t|ƒdkr'|dkr'tjS |S )NçºÙ‚nQ:Br   )	r@   r   Úbesselyr‹  r½   r#   rP  ÚsignÚnan©rP   rE   r0   r3   r3   r4   Ú	mpbessely>  s   z.TestSystematic.test_bessely.<locals>.mpbesselyrš  r›  rg  rh  éˆ  r’  )r   r,   Úyvr   r   ©rn  r¸  r3   r3   r4   Útest_bessely=  s   	
üzTestSystematic.test_besselyc                 C   s,   dd„ }t dd„ t|ƒtƒ tƒ gdd� d S )Nc                 S   sf   t tj| |fi t¤Žƒ}t|ƒdkr1tjdd�� tjt |¡ }W d   ƒ |S 1 s,w   Y  |S )Nr³  rœ   r�   )	r(   r   r´  r‹  r½   r#   rŸ   rP  rµ  r·  r3   r3   r4   r¸  O  s   
ÿþz6TestSystematic.test_bessely_complex.<locals>.mpbesselyc                 S   rJ   rK   )r,   rº  rN   rO   r3   r3   r4   rQ   W  rR   z5TestSystematic.test_bessely_complex.<locals>.<lambda>i˜:  r’  r   r»  r3   r3   r4   Útest_bessely_complexN  s   

üz#TestSystematic.test_bessely_complexc                 C   s0   dd„ }t dd„ t|ƒtddƒtddƒgƒ d S )	Nc                 S   s.   t t | |¡ƒ}t|ƒdkr|dkrtjS |S rd  )r@   r   r´  r½   r#   r¶  r·  r3   r3   r4   r¸  ^  s   z2TestSystematic.test_bessely_int.<locals>.mpbesselyc                 S   ó   t  t| ƒ|¡S rK   )r,   ÚynrÛ   rO   r3   r3   r4   rQ   e  rë   z1TestSystematic.test_bessely_int.<locals>.<lambda>r{   éè  rg  rh  ©r   r   r   r   r»  r3   r3   r4   Útest_bessely_int]  s   ýzTestSystematic.test_bessely_intc                    sV   g ‰ d‡ fdd„	‰t tj‡fdd„tƒ tƒ gddd� t tjˆt ˆ ¡ddd	d
� d S )NFc                    sj   | dk s|dk rt jS | dk s|dk r/tt| | ƒƒd dkr/|r/ˆ  t| ƒt|ƒf¡ t jS t | |¡S )Ng   ¢”mÂr   r"   )r#   r¶  r½   r@   r'   r   ré   )ru   rt   Únonzero©Ú
bad_pointsr3   r4   ré   m  s   (z&TestSystematic.test_beta.<locals>.betac                    ó   ˆ | |dd�S ©NT)rÃ  r3   rê   )ré   r3   r4   rQ   ~  rR   z*TestSystematic.test_beta.<locals>.<lambda>rè   T©rË   r±   ç•dyáý¥=)rË   r±   rq   ©F)r   r,   ré   r   r#   r*   rm  r3   )rÅ  ré   r4   ró   j  s"   

û
úzTestSystematic.test_betac                 C   s,   t tjtƒ tdd„ ƒƒtƒ tƒ tƒ gƒ d S )Nc                 S   s   t j| |d|dd�S )Nr   T©r  ©r   Úbetainc©ru   rt   rE   r3   r3   r4   rQ   ’  rŒ  z-TestSystematic.test_betainc.<locals>.<lambda>)r   r,   rÍ  r   r   r   rm  r3   r3   r4   Útest_betainc�  s   ÿÿùzTestSystematic.test_betaincc                 C   s0   t tjtƒ tdd„ ƒƒtƒ tƒ tƒ gdd� d S )Nc                 S   s   t j| ||ddd�S )Nr"   TrË  rÌ  rÎ  r3   r3   r4   rQ   �  rŒ  z.TestSystematic.test_betaincc.<locals>.<lambda>rè   ©rË   )r   r,   Úbetainccr   r   r   rm  r3   r3   r4   Útest_betaincc˜  s   ÿÿ
øzTestSystematic.test_betainccc                    sR   g ‰ d
‡ fdd„	‰t tj‡fdd„tƒ tƒ gdd� t tjˆt ˆ ¡ddd	� d S )NFc                    sx   t |ƒdt | ƒd  krtjS | |k r6t t| | ƒt t| | ƒ¡ ƒdk r6|r6ˆ  t| ƒt|ƒf¡ tjS t | |¡S )Nrh  r"   rn   )r½   r#   r¶  r@   r}   r'   r   Úbinomial)rD   ÚkrÃ  rÄ  r3   r4   rÓ  §  s   .z+TestSystematic.test_binom.<locals>.binomialc                    rÆ  rÇ  r3   )rD   rÔ  )rÓ  r3   r4   rQ   ¸  rR   z+TestSystematic.test_binom.<locals>.<lambda>rè   rÐ  rä   ©rË   rq   rÊ  )r   r,   Úbinomr   r#   r*   rm  r3   )rÅ  rÓ  r4   Ú
test_binom¤  s   

ü
ûzTestSystematic.test_binomc                 C   ó(   t dd„ tdd„ ƒtƒ tƒ gdd� d S )Nc                 S   r¾  rK   )r,   Úeval_chebytrÛ   ©rD   rE   r3   r3   r4   rQ   Ç  rë   z0TestSystematic.test_chebyt_int.<locals>.<lambda>c                 S   r—  rK   )r   Úchebytr‹  rÚ  r3   r3   r4   rQ   È  rŒ  r6   rÐ  rÁ  rm  r3   r3   r4   Útest_chebyt_intÅ  ó   


üzTestSystematic.test_chebyt_intFz'some cases in hyp2f1 not fully accurate)ÚrunÚreasonc                 C   s&   t tjdd„ tddƒtƒ gdd� d S )Nc                 S   ó   t ƒ ttjƒƒ| |fi t¤ŽS rK   )r   r   r   rÛ  r‹  rÚ  r3   r3   r4   rQ   Ñ  ó    ÿþþz,TestSystematic.test_chebyt.<locals>.<lambda>é›ÿÿÿée   é'  r’  )r   r,   rÙ  r   rm  r3   r3   r4   Útest_chebytÍ  s   
úzTestSystematic.test_chebytc                 C   rØ  )Nc                 S   r¾  rK   )r,   Úeval_chebyurÛ   rÚ  r3   r3   r4   rQ   Ú  rë   z0TestSystematic.test_chebyu_int.<locals>.<lambda>c                 S   r—  rK   )r   Úchebyur‹  rÚ  r3   r3   r4   rQ   Û  rŒ  r6   rÐ  rÁ  rm  r3   r3   r4   Útest_chebyu_intØ  rÝ  zTestSystematic.test_chebyu_intc                 C   s"   t tjdd„ tddƒtƒ gƒ d S )Nc                 S   rà  rK   )r   r   r   rç  r‹  rÚ  r3   r3   r4   rQ   ä  rá  z,TestSystematic.test_chebyu.<locals>.<lambda>râ  rã  )r   r,   ræ  r   rm  r3   r3   r4   Útest_chebyuà  s
   ûzTestSystematic.test_chebyuc                 C   ó6   dd„ }t |tjtƒ gƒ t |tjtg d¢ƒgƒ d S )Nc                 S   rc  rr  ©r,   Úshichir§   r3   r3   r4   Úchië  rw  z$TestSystematic.test_chi.<locals>.chi©gíþÿÿÿU@éX   gá   V@)r   r   rí  r   r   ©rn  rí  r3   r3   r4   Útest_chiê  ó   zTestSystematic.test_chic                 C   ó8   dd„ }t |tjtttj dƒttjdƒƒgdd� d S )Nc                 S   rc  rr  rë  r$  r3   r3   r4   rí  ò  rw  z,TestSystematic.test_chi_complex.<locals>.chirg  rh  r^   r=   )r   r   rí  r   r(   r#   rP  rð  r3   r3   r4   Útest_chi_complexñ  ó   
üzTestSystematic.test_chi_complexc                 C   s"   dd„ }t |tjtddƒgƒ d S )Nc                 S   rc  rr  ©r,   Úsicir§   r3   r3   r4   Úciý  rw  z"TestSystematic.test_ci.<locals>.cirg  rh  )r   r   rø  r   ©rn  rø  r3   r3   r4   Útest_ciü  s   zTestSystematic.test_cic                 C   ó8   dd„ }t |tjttdtj ƒtdtjƒƒgdd� d S )Nc                 S   rc  rr  rö  r$  r3   r3   r4   rø    rw  z*TestSystematic.test_ci_complex.<locals>.cirg  rh  rN  r=   )r   r   rø  r   r(   r#   rP  rù  r3   r3   r4   Útest_ci_complex  rõ  zTestSystematic.test_ci_complexc                 C   ó,   t  t¡j}tttjtƒ gdd| d� d S ©NFr   rª  )	r#   r,  r@   r-  r   r   r   r0  r   ©rn  r-  r3   r3   r4   Ú
test_cospi  s    zTestSystematic.test_cospic                 C   ó   t ttjtƒ gddd� d S )NFr<   rª  )r   r   r   r0  r   rm  r3   r3   r4   Útest_cospi_complex  ó   
ûz!TestSystematic.test_cospi_complexc                 C   s"   t tjttjƒtƒ gddd� d S )Nr^   r6   ©r>   rË   )r   r,   r  r   r   r   rm  r3   r3   r4   Útest_digamma  s   
ûzTestSystematic.test_digammac                 C   s,   dd„ }t tjttjƒtƒ gdd|d� d S )Nc                 S   s$   t  | jdk t  | j¡dk @ dd¡S )Nr   gìQ¸…ëñ?FT)r#   ÚwhererN   r½   rF  r$  r3   r3   r4   Úparam_filter&  ó   $z9TestSystematic.test_digamma_complex.<locals>.param_filterr<   r  ©r>   rË   r  )r   r,   r  r   r   r   )rn  r  r3   r3   r4   Útest_digamma_complex#  s   
úz#TestSystematic.test_digamma_complexc                 C   ó   t tjtjtƒ gdd� d S )Nrä   r=   )r   r,   Úexp1r   Úe1r   rm  r3   r3   r4   Útest_e12  s   
üzTestSystematic.test_e1c                 C   s¬   t tjtjtttj dƒttjdƒƒgdd� t tjtjt 	ddd¡d d …d f tj
dt d	d
d¡t d	d
d¡ f d   ¡ dd� t tjtjt 	ddd¡d dd� d S )Nrg  rh  rÉ  r=   éÎÿÿÿr6   é«   r   r’   r   é=   rÄ   r   iÝÿÿÿrä  y                )r   r,   r  r   r  r   r(   r#   rP  r%   rÎ   r$   rÏ   rm  r3   r3   r4   Útest_e1_complex:  s*   ü(ÿû
üzTestSystematic.test_e1_complexc                 C   s˜   t tjdd„ tt t tj¡j¡ t t tj¡j¡d�gƒ t tjdd„ t 	ddddd	tj
g¡d
d� tt t tj
¡¡ƒ tt tj
 ¡dkƒ d S )Nc                 S   ó    | dkrt  | ¡|  S t  d¡S ©Nr   z1.0©r   Úexpm1Úmpfr§   r3   r3   r4   rQ   U  r›   z,TestSystematic.test_exprel.<locals>.<lambda>rê   c                 S   r  r  r  r§   r3   r3   r4   rQ   [  r›   r^   g§Ž¨™ÂWó:r   g   ¢”mBg´�ÙyCxêDrÉ  r=   )r   r,   Úexprelr   r#   rì   r,  r‹   r¾   r*   rP  r   Úisinfrm  r3   r3   r4   Útest_exprelR  s   ÿýüzTestSystematic.test_exprelc                 C   s.   t tjtjtttj dƒttjdƒƒgƒ d S )Nç    ÐcÁç    ÐcA)r   r,   r  r   r   r(   r#   rP  rm  r3   r3   r4   Útest_expm1_complexb  s
   ýz!TestSystematic.test_expm1_complexc                 C   ó   t tjdd„ tƒ gdd� d S )Nc                 S   s   t  | d ¡S rr  ©r   rì   r§   r3   r3   r4   rQ   m  rR   z3TestSystematic.test_log1p_complex.<locals>.<lambda>é<   rÐ  )r   r,   Úlog1pr   rm  r3   r3   r4   Útest_log1p_complexj  s   
üz!TestSystematic.test_log1p_complexc                 C   s   t tdd„ tƒ gddd� d S )Nc                 S   s   t  | d ¡|  S rr  r  r§   r3   r3   r4   rQ   u  r”  z-TestSystematic.test_log1pmx.<locals>.<lambda>r   rä   )rË   r>   )r   r   r   rm  r3   r3   r4   Útest_log1pmxr  s   
ûzTestSystematic.test_log1pmxc                 C   r  )NrÉ  r=   )r   r,   r-   r   r)   r   rm  r3   r3   r4   Útest_ei{  ó   zTestSystematic.test_eic                 C   s2   t tjtjtttj dƒttjdƒƒgdd� d S )Nrg  rh  r¯   r=   )	r   r,   r-   r   r)   r   r(   r#   rP  rm  r3   r3   r4   Útest_ei_complex~  s   
üzTestSystematic.test_ei_complexc                 C   s   t tjtjtdd�gƒ d S )Nr™   ©rt   )r   r,   Úelliper   r   rm  r3   r3   r4   Útest_ellipe‡  r%  zTestSystematic.test_ellipec                 C   s$   t tjtjtddƒtdd�gƒ d S )Nrj  rk  r™   r'  ©r   r,   Ú	ellipeincr   r(  r   rm  r3   r3   r4   Útest_ellipeincŠ  r  zTestSystematic.test_ellipeincc                 C   ó   t tjtjtƒ tƒ gƒ d S rK   r*  rm  r3   r3   r4   Útest_ellipeinc_largephi�  r%  z&TestSystematic.test_ellipeinc_largephic                 C   s    t tjtjtddƒtƒ gƒ d S ©Nrj  rk  ©r   r,   Ú	ellipkincr   Úellipfr   rm  r3   r3   r4   Útest_ellipf�  s    zTestSystematic.test_ellipfc                 C   r-  rK   r0  rm  r3   r3   r4   Útest_ellipf_largephi“  r%  z#TestSystematic.test_ellipf_largephic                 C   s:   t tjtjtdd�gƒ t tjdd„ tdd�gdd� d S )	Nr™   r'  c                 S   s   t  d|  ¡S rr  )r   r>  )r8  r3   r3   r4   rQ   š  rR   z,TestSystematic.test_ellipk.<locals>.<lambda>g        )ru   rè   rÐ  )r   r,   r>  r   r   Úellipkm1rm  r3   r3   r4   Útest_ellipk–  s   

üzTestSystematic.test_ellipkc                 C   s.   dd„ }t tj|tddƒtdd�gdd� d S )	Nc                 S   ó   t  d| |¡S rd  ©r   Úellippi©Úphir8  r3   r3   r4   r1     rw  z0TestSystematic.test_ellipkinc.<locals>.ellipkincrj  rk  r™   r'  Tr¥  ©r   r,   r1  r   ©rn  r1  r3   r3   r4   Útest_ellipkincŸ  s   
üzTestSystematic.test_ellipkincc                 C   s*   dd„ }t tj|tƒ tdd�gdd� d S )Nc                 S   r7  rd  r8  r:  r3   r3   r4   r1  ª  rw  z9TestSystematic.test_ellipkinc_largephi.<locals>.ellipkincr™   r'  Tr¥  r<  r=  r3   r3   r4   Útest_ellipkinc_largephi©  s   
üz&TestSystematic.test_ellipkinc_largephic                 C   s2   dd„ }t dd„ |tddƒtddd	�gd
d� d S )Nc                 S   s   | dkrdS t jd| |d�S )Nr   Úsnr6  ©r   r<  r6  r3   r3   r4   r@  ´  s   z+TestSystematic.test_ellipfun_sn.<locals>.snc                 S   r2  rd  r4  r6  r3   r3   r4   rQ   ¿  rë   z1TestSystematic.test_ellipfun_sn.<locals>.<lambda>ç    €„.Áç    €„.Ar   r"   rê   rN  r=   rx  )rn  r@  r3   r3   r4   Útest_ellipfun_sn³  s   

üzTestSystematic.test_ellipfun_snc                 C   ó.   t dd„ dd„ tddƒtddd�gd	d
� d S )Nc                 S   r2  rr  r4  r6  r3   r3   r4   rQ   È  rë   z1TestSystematic.test_ellipfun_cn.<locals>.<lambda>c                 S   ó   t jd| |d�S )NÚcnr6  rA  r6  r3   r3   r4   rQ   É  rë   rB  rC  r   r"   rê   rN  r=   rx  rm  r3   r3   r4   Útest_ellipfun_cnÅ  ó   
üzTestSystematic.test_ellipfun_cnc                 C   rE  )Nc                 S   r2  r3  r4  r6  r3   r3   r4   rQ   Ñ  rë   z1TestSystematic.test_ellipfun_dn.<locals>.<lambda>c                 S   rF  r;  rA  r6  r3   r3   r4   rQ   Ò  rë   rB  rC  r   r"   rê   rN  r=   rx  rm  r3   r3   r4   Útest_ellipfun_dnÎ  rI  zTestSystematic.test_ellipfun_dnc                 C   s   t tjdd„ tƒ gƒ d S )Nc                 S   r  rK   ©r   rÆ   r$  r3   r3   r4   rQ   Ø  ó   
 z)TestSystematic.test_erf.<locals>.<lambda>)r   r,   rÆ   r   rm  r3   r3   r4   Útest_erf×  s   zTestSystematic.test_erfc                 C   r  )Nc                 S   r  rK   rK  r$  r3   r3   r4   rQ   Û  rL  z1TestSystematic.test_erf_complex.<locals>.<lambda>r9   r’  )r   r,   rÆ   r   rm  r3   r3   r4   r×   Ú  s   zTestSystematic.test_erf_complexc                 C   ó"   t tjtdd„ ƒtƒ gdd� d S )Nc                 S   r  rK   ©r   rÉ   r$  r3   r3   r4   rQ   à  rL  z*TestSystematic.test_erfc.<locals>.<lambda>r<   r=   )r   r,   rÉ   r   r   rm  r3   r3   r4   Ú	test_erfcÝ  ó   

üzTestSystematic.test_erfcc                 C   rN  )Nc                 S   r  rK   rO  r$  r3   r3   r4   rQ   è  rL  z2TestSystematic.test_erfc_complex.<locals>.<lambda>r9   r’  )r   r,   rÉ   r   r   rm  r3   r3   r4   Útest_erfc_complexå  rQ  z TestSystematic.test_erfc_complexc                 C   ó   t tjtjtƒ gdd� d S ©Nr9   r’  )r   r,   Úerfir   r   rm  r3   r3   r4   Ú	test_erfií  r%  zTestSystematic.test_erfic                 C   rS  rT  )r   r,   rU  r   r   rm  r3   r3   r4   Útest_erfi_complexð  r%  z TestSystematic.test_erfi_complexc                 C   rN  )Nc                 S   r  rK   )r   Úncdfr$  r3   r3   r4   rQ   ö  rL  z*TestSystematic.test_ndtr.<locals>.<lambda>r9   r’  )r   r,   Úndtrr   r   rm  r3   r3   r4   Ú	test_ndtró  rQ  zTestSystematic.test_ndtrc                 C   s0   t tjdd„ ttddƒtddƒd�gdd� d S )Nc                 S   s   t  |  t d¡ ¡d S ©Ng       @)r   rÉ   r#   Úsqrtr$  r3   r3   r4   rQ   þ  rí   z2TestSystematic.test_ndtr_complex.<locals>.<lambda>éðØÿÿrä  rê   rè   r’  )r   r,   rY  r   r(   rm  r3   r3   r4   Útest_ndtr_complexû  s   
üz TestSystematic.test_ndtr_complexc                 C   s&   t tjtdd„ ƒtƒ gdddd� d S )Nc                 S   s   t  t  | ¡¡S rK   )r   rì   rX  r$  r3   r3   r4   rQ     rë   z.TestSystematic.test_log_ndtr.<locals>.<lambda>iX  r  r<   ©rD   rË   r>   )r   r,   Úlog_ndtrr   r   rm  r3   r3   r4   Útest_log_ndtr  s
   

ýzTestSystematic.test_log_ndtrc                 C   s6   t tjtdd„ ƒttddƒtddƒd�gdd	d
� d S )Nc                 S   s    t  t  |  t d¡ ¡d ¡S r[  )r   rì   rÉ   r#   r\  r$  r3   r3   r4   rQ     r›   z6TestSystematic.test_log_ndtr_complex.<locals>.<lambda>r]  r)  rä  r:   rê   r9   r  ©rD   rË   )r   r,   r`  r   r   r(   rm  r3   r3   r4   Útest_log_ndtr_complex
  s   

üz$TestSystematic.test_log_ndtr_complexc                 C   s"   t dd„ tjtddƒgdd� d S )Nc                 S   rc  )Nrx   )r,   Úeulerr’  r3   r3   r4   rQ     rR   z.TestSystematic.test_eulernum.<locals>.<lambda>r"   rä  r’  )r   r   Úeulernumr   rm  r3   r3   r4   Útest_eulernum  s   

üzTestSystematic.test_eulernumc                 C   s,   t tjtjtddƒtdtjƒgddd� d S )Nr   r9   r<   é    r  )	r   r,   rC   r   rA   r   r   r#   rP  rm  r3   r3   r4   Útest_expint  r¯  zTestSystematic.test_expintc                 C   ó   dd„ }t |tjtƒ gƒ d S )Nc                 S   rc  rd  ©r,   Úfresnelr§   r3   r3   r4   Úfresnels$  rw  z.TestSystematic.test_fresnels.<locals>.fresnels)r   r   rl  r   )rn  rl  r3   r3   r4   Útest_fresnels#  ó   zTestSystematic.test_fresnelsc                 C   ri  )Nc                 S   rc  rr  rj  r§   r3   r3   r4   Úfresnelc)  rw  z.TestSystematic.test_fresnelc.<locals>.fresnelc)r   r   ro  r   )rn  ro  r3   r3   r4   Útest_fresnelc(  rn  zTestSystematic.test_fresnelcc                 C   s   t tjttjƒtƒ gƒ d S rK   )r   r,   Úgammar   r   r   rm  r3   r3   r4   Ú
test_gamma-  r%  zTestSystematic.test_gammac                 C   ó    t tjttjƒtƒ gdd� d S ©Nro   r=   )r   r,   rq  r   r   r   rm  r3   r3   r4   Útest_gamma_complex0  ó   
üz!TestSystematic.test_gamma_complexc                 C   ó0   t tjdd„ tdddd�tddƒgddd� d S )	Nc                 S   ó   t j| |dd�S )NTr  ©r   r  )r2   rt   r3   r3   r4   rQ   <  rë   z.TestSystematic.test_gammainc.<locals>.<lambda>r   ç     ˆÃ@F©Úinclusive_arÉ  rª  )r   r,   r  r   rm  r3   r3   r4   Útest_gammainc8  ó   
ûzTestSystematic.test_gammaincc                 C   rw  )	Nc                 S   rx  )NT)ru   r  ry  )r2   ru   r3   r3   r4   rQ   F  rë   z/TestSystematic.test_gammaincc.<locals>.<lambda>r   rz  Fr{  rÉ  rª  )r   r,   Ú	gammainccr   rm  r3   r3   r4   Útest_gammainccB  r~  zTestSystematic.test_gammainccc                 C   s"   dd„ }t tjt|ƒtƒ gƒ d S )Nc                 S   s   t  | ¡jS rK   ©r   rö   rN   r$  r3   r3   r4   ÚfN  s   z&TestSystematic.test_gammaln.<locals>.f)r   r,   Úgammalnr   r   )rn  r‚  r3   r3   r4   Útest_gammalnL  s   zTestSystematic.test_gammaln)rÞ  c                 C   s(   t tjttjƒtddƒtƒ tƒ gƒ d S r/  )r   r,   Úeval_gegenbauerr   r   Ú
gegenbauerr   rm  r3   r3   r4   Útest_gegenbauerS  s
   ýzTestSystematic.test_gegenbauerc                 C   st   dd„ }dd„ }t |t|ƒtddƒtddƒtƒ gd	dd
dd� t |t|ƒtddƒtƒ tt ddd¡ƒgdd
d� d S )Nc                 S   s¶   t |ƒdkr	tjS | dkrd}n| dkrd| | }nt | ||¡}t|ƒdkrP|dk rPt|ƒtt|ƒƒkrPt | |t d¡ |¡}t |ƒt d¡k rPt d¡}t |ƒd	krYtjS |S )
Nr›  r   r™   r"   r   rx   z1e-50z0.0ç\žç4@Iþw)	r½   r#   r¶  r   r†  r@   rÛ   r  rP  ©rD   ru   rE   r0   r3   r3   r4   r†  ]  s   (
z6TestSystematic.test_gegenbauer_int.<locals>.gegenbauerc                 S   s(   t  t| ƒ||¡}t|ƒdkrtjS |S )Nrˆ  )r,   r…  rÛ   r½   r#   rP  r‰  r3   r3   r4   Úsc_gegenbauerx  s   z9TestSystematic.test_gegenbauer_int.<locals>.sc_gegenbauerr   r:   g    eÍÍÁg    eÍÍAi@œ  TrØ   )rD   rË   r±   r>   r  éüÿÿÿr   rÈ  )r   r   r   r   r   r#   r$   )rn  r†  rŠ  r3   r3   r4   Útest_gegenbauer_int[  s   ü
üz"TestSystematic.test_gegenbauer_intc                 C   s*   t dd„ ttjƒtddƒtƒ tƒ gƒ d S )Nc                 S   s   t  t| ƒ|j|¡S rK   )r,   r…  rÛ   rN   ©rD   ru   rE   r3   r3   r4   rQ   �  rŒ  z8TestSystematic.test_gegenbauer_complex.<locals>.<lambda>r   r:   )r   r   r   r†  r   r   r   rm  r3   r3   r4   Útest_gegenbauer_complex�  ó
   ýz&TestSystematic.test_gegenbauer_complexc                 C   s*   t dd„ ttjƒtddƒtƒ tƒ gƒ d S )Nc                 S   ó   t  | j|j|¡S rK   )r,   r…  rN   r�  r3   r3   r4   rQ   ˜  r”  z@TestSystematic.test_gegenbauer_complex_general.<locals>.<lambda>rj  rk  )r   r   r   r†  r   r   rm  r3   r3   r4   Útest_gegenbauer_complex_general•  r�  z.TestSystematic.test_gegenbauer_complex_generalc                 C   ó&   t tjtdd„ ƒtddƒtƒ gƒ d S )Nc                 S   r—  rK   )r   Úhankel1r‹  ©rP   rE   r3   r3   r4   rQ      rŒ  z-TestSystematic.test_hankel1.<locals>.<lambda>ç@Œµx¯Äç@Œµx¯D)r   r,   r“  r   r   rm  r3   r3   r4   Útest_hankel1�  ó
   
ýzTestSystematic.test_hankel1c                 C   r’  )Nc                 S   r—  rK   )r   Úhankel2r‹  r”  r3   r3   r4   rQ   §  rŒ  z-TestSystematic.test_hankel2.<locals>.<lambda>r•  r–  )r   r,   r™  r   r   rm  r3   r3   r4   Útest_hankel2¤  r˜  zTestSystematic.test_hankel2z%issues at intermediately large ordersc                 C   s&   t dd„ ttjƒtddƒtƒ gƒ d S )Nc                 S   r¾  rK   )r,   Úeval_hermiterÛ   rÚ  r3   r3   r4   rQ   ®  rë   z-TestSystematic.test_hermite.<locals>.<lambda>r   rä  )r   r   r   Úhermiter   r   rm  r3   r3   r4   Útest_hermite«  s
   ýzTestSystematic.test_hermitec                    s:   t ddd�‰ ttj‡ fdd„tddƒtdd	ƒgd
d� d S )Nrè   iÜ  r_  c                    s   t j| |fi ˆ ¤ŽS rK   rZ   ©ru   rE   ©ÚKWr3   r4   rQ   »  rŒ  z,TestSystematic.test_hyp0f1.<locals>.<lambda>r  r  r   g     jø@r¹  r’  )rŠ   r   r,   rM   r   rm  r3   rŸ  r4   Útest_hyp0f1µ  s   

üzTestSystematic.test_hyp0f1c              	   C   s8   t dd„ tdd„ ƒtddƒttddƒtddƒƒgƒ d S )Nc                 S   rJ   rK   rL   )ru   r2   r3   r3   r4   rQ   Æ  rR   z4TestSystematic.test_hyp0f1_complex.<locals>.<lambda>c                 S   r—  rK   )r   rM   r‹  rž  r3   r3   r4   rQ   Ç  rŒ  r–   r   iˆÿÿÿrI   )r   r   r   r   r(   rm  r3   r3   r4   Útest_hyp0f1_complexÄ  s
   
ýz"TestSystematic.test_hyp0f1_complexc              	   C   s<   dd„ }t tj|tddƒtdddd�tddƒgddd	� d S )
Nc                 S   s*   zt  | ||¡W S  ty   tj Y S w rK   )r   Úhyp1f1ÚZeroDivisionErrorr#   rP  rÎ  r3   r3   r4   Úmpmath_hyp1f1Ï  s
   
ÿz1TestSystematic.test_hyp1f1.<locals>.mpmath_hyp1f1r  r6   r"   Fr{  r´   )rD   r«  )r   r,   r£  r   )rn  r¥  r3   r3   r4   Útest_hyp1f1Î  s   
ûzTestSystematic.test_hyp1f1c                 C   s8   t tdd„ ƒtdd„ ƒtddƒtddƒtƒ gdd� d S )Nc                 S   r�  rK   )r,   r£  rN   rÎ  r3   r3   r4   rQ   à  r”  z4TestSystematic.test_hyp1f1_complex.<locals>.<lambda>c                 S   ó   t j| ||fi t¤ŽS rK   )r   r£  r‹  rÎ  r3   r3   r4   rQ   á  r“  rj  rk  iÐ  r’  )r   r   r   r   r   rm  r3   r3   r4   Útest_hyp1f1_complexÝ  s   


üz"TestSystematic.test_hyp1f1_complexc                 C   s<   t dd„ tdd„ ƒtddƒtddƒtddƒtƒ gdd� d S )Nc                 S   s   t  | j|j|j|¡S rK   )r,   r�   rN   ©ru   rt   r~   rE   r3   r3   r4   rQ   ê  r“  z4TestSystematic.test_hyp2f1_complex.<locals>.<lambda>c                 S   ó   t j| |||fi t¤ŽS rK   )r   r�   r‹  r©  r3   r3   r4   rQ   ë  r]   g      YÀg      Y@r   r’  r   rm  r3   r3   r4   Útest_hyp2f1_complexæ  s   

üz"TestSystematic.test_hyp2f1_complexc                 C   s&   t tjtdd„ ƒtƒ tƒ tƒ gƒ d S )Nc                 S   r§  rK   )r   rs   r‹  rÎ  r3   r3   r4   rQ   ô  r“  z,TestSystematic.test_hyperu.<locals>.<lambda>)r   r,   rs   r   r   rm  r3   r3   r4   Útest_hyperuð  s
   
ýzTestSystematic.test_hyperuz:mpmath issue gh-342: unsupported operand mpz, long for powc                 C   s2   dd„ }t t|tdddd�tddƒgddd	� d S )
Nc                 S   s"   t  || ¡t  | ¡ t  | ¡ S rK   )r   Úpowerr&   rq  rž  r3   r3   r4   Úmp_igam_facû  ó   "z1TestSystematic.test_igam_fac.<locals>.mp_igam_facr   g  �Ä¼ÖBFr{  r†   é   r  )r   r   r   )rn  r®  r3   r3   r4   Útest_igam_facø  s   
ûzTestSystematic.test_igam_facc                 C   ó8   t tjtjtddƒgƒ t tjtjtddƒgdd� d S ©Nrj  rk  rg  rh  ri  r=   )r   r,   Új0r   r   rm  r3   r3   r4   Útest_j0  s    zTestSystematic.test_j0c                 C   r²  r³  )r   r,   Új1r   r   rm  r3   r3   r4   Útest_j1  s    zTestSystematic.test_j1c                 C   sR   t tjtdd„ ƒtƒ tƒ tƒ tƒ gƒ t dd„ tdd„ ƒtƒ tƒ tƒ tƒ gƒ d S )Nc                 S   rª  rK   ©r   Újacobir‹  r©  r3   r3   r4   rQ     r]   z,TestSystematic.test_jacobi.<locals>.<lambda>c                 S   ó   t  t| ƒ|||¡S rK   ©r,   Úeval_jacobirÛ   )rD   rt   r~   rE   r3   r3   r4   rQ     rŒ  c                 S   rª  rK   r¸  r©  r3   r3   r4   rQ     r]   )r   r,   r¼  r   r   r   rm  r3   r3   r4   Útest_jacobi  s   
ý
ýzTestSystematic.test_jacobic                    s:   dd„ ‰ t dd„ ‡ fdd„tƒ tƒ tƒ tƒ gddd� d S )	Nc                 S   s   | dkrdS t  | |||¡S )Nr   r™   )r   r¹  ©rD   ru   rt   rE   r3   r3   r4   r¹  #  s   z.TestSystematic.test_jacobi_int.<locals>.jacobic                 S   rº  rK   r»  r¾  r3   r3   r4   rQ   )  rŒ  z0TestSystematic.test_jacobi_int.<locals>.<lambda>c                    s   t ˆ ƒ| |||fi t¤ŽS rK   )r   r‹  r¾  ©r¹  r3   r4   rQ   *  rí   é N  r6   rb  ©r   r   r   rm  r3   r¿  r4   Útest_jacobi_int!  s   

ûzTestSystematic.test_jacobi_intc                 C   s&   dd„ }t tj|tddƒgdd� d S )Nc                 S   s*   | dkr	t  d S ttjƒd| fi t¤ŽS )Nr   r8   )r   r   r   Úkeir‹  r§   r3   r3   r4   rÃ  1  s   
z$TestSystematic.test_kei.<locals>.keiçêŒ 9Y>)ÆçêŒ 9Y>)FrÀ  r’  )r   r,   rÃ  r   )rn  rÃ  r3   r3   r4   Útest_kei0  s   zTestSystematic.test_keic                 C   s&   t tjtdd„ ƒtddƒgdd� d S )Nc                 S   r‰  rd  )r   Úkerr‹  r§   r3   r3   r4   rQ   ;  rŒ  z)TestSystematic.test_ker.<locals>.<lambda>rÄ  rÅ  rÀ  r’  )r   r,   rÇ  r   r   rm  r3   r3   r4   Útest_ker8  s   


üzTestSystematic.test_kerc                 C   s"   t ttjƒdd„ tƒ tƒ gƒ d S )Nc                 S   ó   t tjƒ| |fi t¤ŽS rK   ©r   r   Úlaguerrer‹  rÚ  r3   r3   r4   rQ   D  r]   z.TestSystematic.test_laguerre.<locals>.<lambda>)r   r   r,   Úeval_laguerrer   rm  r3   r3   r4   Útest_laguerre@  s
   
ýzTestSystematic.test_laguerrec                 C   s$   t dd„ dd„ tƒ tƒ gdd� d S )Nc                 S   r¾  rK   )r,   rÌ  rÛ   rÚ  r3   r3   r4   rQ   J  rë   z2TestSystematic.test_laguerre_int.<locals>.<lambda>c                 S   rÉ  rK   rÊ  rÚ  r3   r3   r4   rQ   K  r]   rÀ  r’  rÁ  rm  r3   r3   r4   Útest_laguerre_intH  s   

üz TestSystematic.test_laguerre_intzsee gh-3551 for bad pointsc                 C   s4   t dd„ dd„ ttj tjƒtddƒgddd� d S )	Nc                 S   ó   t  | t|jƒ¡S rK   )r,   rG  rÛ   rN   ©rE   rÔ  r3   r3   r4   rQ   S  r”  z3TestSystematic.test_lambertw_real.<locals>.<lambda>c                 S   rÏ  rK   )r   rG  rÛ   rN   rÐ  r3   r3   r4   rQ   T  r”  r   r   r<   F©r>   r«  )r   r   r#   rP  r   rm  r3   r3   r4   Útest_lambertw_realP  s   
üz!TestSystematic.test_lambertw_realc                    sB   d}t  d¡‰ d‰‡ ‡fdd„}t|tjtd|dd�gd	d
� d S )NgGöaåúse@r"   g  €¹E@c                    s¢   t jdd��A | ˆ d ˆ  | d  }|t jkr|t| ƒ }n | ˆ d ˆ  d| d   }|t| ƒ }||9 }W d   ƒ |S W d   ƒ |S 1 sJw   Y  |S )Nrœ   )ÚoverrH   )r#   rŸ   rP  r   )rE   ÚfacrU   ©ÚeÚgr3   r4   rq  ^  s   


ùû
ýøz:TestSystematic.test_lanczos_sum_expg_scaled.<locals>.gammar   Fr{  r<   r=   )r#   r&   r   r   rq  r   )rn  Úmaxgammarq  r3   rÕ  r4   Útest_lanczos_sum_expg_scaledY  s   

üz+TestSystematic.test_lanczos_sum_expg_scaledc                 C   r-  rK   )r   r,   Úeval_legendrer   Úlegendrer   rm  r3   r3   r4   Útest_legendrep  s   zTestSystematic.test_legendrec              
   C   sL   t dd„ dd„ tƒ tƒ gdd� t dd„ dd„ tƒ tt dd	d
¡ƒgƒ d S )Nc                 S   r¾  rK   ©r,   rÚ  rÛ   rÚ  r3   r3   r4   rQ   v  rë   z2TestSystematic.test_legendre_int.<locals>.<lambda>c                 S   rÉ  rK   ©r   r   rÛ  r‹  rÚ  r3   r3   r4   rQ   w  r]   rÀ  r’  c                 S   r¾  rK   rÝ  rÚ  r3   r3   r4   rQ   ~  rë   c                 S   rÉ  rK   rÞ  rÚ  r3   r3   r4   rQ     r]   r  r‹  rf   )r   r   r   r   r#   r$   rm  r3   r3   r4   Útest_legendre_intt  s   
üýz TestSystematic.test_legendre_intc                 C   sd   dd„ }dd„ }dd„ }t ||tddƒtddƒtƒ gƒ t ||tddƒtddƒtd	d
ƒgdd� d S )Nc                 S   sˆ   z&t ƒ �}|jtd� t || |¡d d }W d   ƒ n1 s w   Y  W n ty2   tj Y S w t|ƒdkrBtj	t 
|j¡ }|S )N©Úcategoryr   ©rx   rx   ç)�#ÊåÈv)r   ÚfilterÚDeprecationWarningr,   ÚlpmnÚ
ValueErrorr#   r¶  r½   rP  rµ  rN   )rD   r8  r2   ÚsuprP   r3   r3   r4   Úlpnm„  s   þ€
ÿz(TestSystematic.test_legenp.<locals>.lpnmc                 S   s0   t  || |¡}t|ƒdkrtjt |j¡ }|S )Nrã  )r,   rá   r½   r#   rP  rµ  rN   )rD   r8  r2   rP   r3   r3   r4   Úlpnm_2�  s   z*TestSystematic.test_legenp.<locals>.lpnm_2c                 S   sª   |dks|dkr&t | ƒ| kr&|dkr$| dk r|  d } t t |¡| ¡S dS t|ƒdk r/tjS t|ƒdkr7dnd}ttjƒ| |||d�}t|ƒdkrStj	t |j
¡ }|S )	Nr"   rx   r   rn   r   rm   ©Útyperã  )rÛ   r   r­  rµ  r½   r#   r¶  r   rÜ   rP  rN   )rD   r8  r2   ÚtyprP   r3   r3   r4   rÜ   —  s   
z*TestSystematic.test_legenp.<locals>.legenpr)  r:   rx   r"   r†   rœ  rÁ  )rn  ré  rê  rÜ   r3   r3   r4   Útest_legenpƒ  s    
üzTestSystematic.test_legenpc                 C   ó„   dd„ }dd„ }t  g d¢¡}t  g d¢¡}|d d …d f d|d d d …f    ¡ }t||tg d¢ƒtg d¢ƒt|ƒgd	d
d� d S )Nc                 S   ór   z,t ƒ �}|jtd� tj|j| j|dd�d d W  d   ƒ W S 1 s%w   Y  W d S  ty8   tj Y S w )Nrà  r   rë  r   râ  ©	r   rä  rå  r,   ÚclpmnrN   rç  r#   r¶  ©rD   r8  r2   rè  r3   r3   r4   Úclpnm¹  ó   (þ
ÿz3TestSystematic.test_legenp_complex_2.<locals>.clpnmc                 S   ó4   t |ƒdk r	tjS ttjƒt| jƒt|jƒ|dd�S ©Nrn   r   rë  ©r½   r#   r¶  r   r   rÜ   rÛ   rN   ©rD   r8  r2   r3   r3   r4   rÜ   Á  ó   "z4TestSystematic.test_legenp_complex_2.<locals>.legenp©	rz   r®   rG   r   ri  rH   r”   rf   g     @Ÿ@©rj  rG   rH   gÍÌÌÌÌÌô?r   ©rz   rx   r   r"   r   r   rØ   r´   r•  ©r#   r*   rÏ   r   r   ©rn  rô  rÜ   rE   rT   r2   r3   r3   r4   Útest_legenp_complex_2¸  ó   (

þ
ùz$TestSystematic.test_legenp_complex_2c                 C   rï  )Nc                 S   rð  )Nrà  rm   rë  r   râ  rñ  ró  r3   r3   r4   rô  ×  rõ  z3TestSystematic.test_legenp_complex_3.<locals>.clpnmc                 S   rö  )Nrn   rm   rë  rø  rù  r3   r3   r4   rÜ   ß  rú  z4TestSystematic.test_legenp_complex_3.<locals>.legenprû  rü  r   rý  rØ   r´   r•  rþ  rÿ  r3   r3   r4   Útest_legenp_complex_3Ö  r  z$TestSystematic.test_legenp_complex_3z*apparently picks wrong function at |z| > 1c                 C   s4   dd„ }dd„ }t ||tddƒtddƒtƒ gƒ d S )Nc                 S   s   t  || |¡d d S ©Nr   râ  )r,   Úlqmnrù  r3   r3   r4   Úlqnmö  s   z(TestSystematic.test_legenq.<locals>.lqnmc                 S   s(   t |ƒdk r	tjS ttjƒ| ||dd�S r÷  )r½   r#   r¶  r   r   Úlegenqrù  r3   r3   r4   r  ù  s   z*TestSystematic.test_legenq.<locals>.legenqr   r:   rÁ  ©rn  r  r  r3   r3   r4   Útest_legenqô  s   ýzTestSystematic.test_legenqc                 C   s8   dd„ }dd„ }t ||tddƒtddƒtƒ gdd� d S )Nc                 S   s"   t  t|jƒt| jƒ|¡d d S r  )r,   r  rÛ   rN   rù  r3   r3   r4   r    r¯  z0TestSystematic.test_legenq_complex.<locals>.lqnmc                 S   rö  r÷  )r½   r#   r¶  r   r   r  rÛ   rN   rù  r3   r3   r4   r  
  rú  z2TestSystematic.test_legenq_complex.<locals>.legenqr   r:   r’  )r   r   r   r  r3   r3   r4   Útest_legenq_complex  s   
üz"TestSystematic.test_legenq_complexc                 C   s,   dd„ }dd„ }t t|tƒ gdd|d� d S )Nc                 S   s    t  t  | ¡| k| dk@ dd¡S )Nr   FT)r#   r  Úfloorr§   r3   r3   r4   r    s    z0TestSystematic.test_lgam1p.<locals>.param_filterc                 S   s   t  d|  ¡jS rr  r�  r$  r3   r3   r4   Ú	mp_lgam1p  s   z-TestSystematic.test_lgam1p.<locals>.mp_lgam1pr<   r:   r	  )r   r   r   )rn  r  r  r3   r3   r4   Útest_lgam1p  s   
úzTestSystematic.test_lgam1pc                 C   s&   dd„ }t tj|tƒ gdddd� d S )Nc                 S   s4   zt  | ¡}W |S  ty   ttjtjƒ}Y |S w rK   )r   rö   rç  r(   r#   r¶  )r2   rU   r3   r3   r4   Úmpmath_loggamma*  s   þþz5TestSystematic.test_loggamma.<locals>.mpmath_loggammaFrú   )r«  Údistinguish_nan_and_infr>   )r   r,   rö   r   )rn  r  r3   r3   r4   Útest_loggamma)  s   
úzTestSystematic.test_loggammac                 C   s(   dd„ }t |tdd„ ƒtƒ tƒ gƒ d S )Nc                 S   r2  rd  )r,   Úpbdvr”  r3   r3   r4   Úpcfd<  r:  z&TestSystematic.test_pcfd.<locals>.pcfdc                 S   r—  rK   )r   r  r‹  r”  r3   r3   r4   rQ   @  rŒ  z*TestSystematic.test_pcfd.<locals>.<lambda>)r   r   r   )rn  r  r3   r3   r4   Ú	test_pcfd:  s   

ýzTestSystematic.test_pcfdzHit's not the same as the mpmath function --- maybe different definition?c                 C   s(   dd„ }t |dd„ tƒ tƒ gdd� d S )Nc                 S   r2  rd  )r,   Úpbvvr”  r3   r3   r4   ÚpcfvG  r:  z&TestSystematic.test_pcfv.<locals>.pcfvc                 S   rà  rK   )r   r   r   r  r‹  r”  r3   r3   r4   rQ   K  rù   z*TestSystematic.test_pcfv.<locals>.<lambda>rÀ  r’  rx  )rn  r  r3   r3   r4   Ú	test_pcfvD  s   

üzTestSystematic.test_pcfvc                 C   sb   dd„ }dd„ }dd„ }t |tjtddƒtddƒgd	d
d� t ||tddƒtddƒgdd
d� d S )Nc                 S   r2  rd  ©r,   Úpbwarž  r3   r3   r4   ÚpcfwQ  r:  z&TestSystematic.test_pcfw.<locals>.pcfwc                 S   r2  rr  r  rž  r3   r3   r4   ÚdpcfwT  r:  z'TestSystematic.test_pcfw.<locals>.dpcfwc                 S   s   t  t j| |fd¡S )Nr;   )r   Údiffr  rž  r3   r3   r4   Úmpmath_dpcfwW  rã   z.TestSystematic.test_pcfw.<locals>.mpmath_dpcfwrd   re   g:Œ0âŽyU>r:   r•  g•Ö&è.!>)r   r   r  r   )rn  r  r  r  r3   r3   r4   Ú	test_pcfwP  s"   û
ûzTestSystematic.test_pcfwzCissues at large arguments (atol OK, rtol not) and <eps-close to z=0c                 C   s*   t tjtƒ ttjƒƒtddƒtƒ gƒ d S )Nr   rÀ  )r   r,   Ú	polygammar   r   r   r   r   rm  r3   r3   r4   Útest_polygammal  s
   ýzTestSystematic.test_polygammac                 C   s&   t tjtjtdtjƒgdddd� d S )NiÀàÿÿr¹  FT)rD   r«  r±   )r   r,   r  r   r   r#   rP  rm  r3   r3   r4   Útest_rgammav  s   
úzTestSystematic.test_rgammac                 C   rs  rt  )r   r,   r  r   r   r   rm  r3   r3   r4   Útest_rgamma_complex€  rv  z"TestSystematic.test_rgamma_complexzNsee gh-3551 for bad points on 32 bit systems and gh-8095 for another bad point)rß  c                 C   sD   t  tj¡t  d¡krtj}ndd„ }ttj|t	ƒ t	ƒ gdd� d S )Nrw   c                 S   sN   t | | ƒt| | ƒkr!t | | ƒdkr!t | ¡} t| | ƒ|  }t | |¡S rd  )r@   rÛ   r   r  Úrf)ru   r8  r3   r3   r4   Úmppoch�  s   (
z&TestSystematic.test_rf.<locals>.mppochrè   rÐ  )
r   Úparser   r¼   ÚVersionr!  r   r,   Úpochr   )rn  r"  r3   r3   r4   Útest_rfˆ  s   	zTestSystematic.test_rfc                 C   rý  rþ  )	r#   r,  r@   r-  r   r   r   r*  r   rÿ  r3   r3   r4   Ú
test_sinpi›  s   
ûzTestSystematic.test_sinpic                 C   r  )NFg›+¡†›„=rª  )r   r   r   r*  r   rm  r3   r3   r4   Útest_sinpi_complex¥  r  z!TestSystematic.test_sinpi_complexc                 C   rê  )Nc                 S   rc  rd  rë  r§   r3   r3   r4   Úshi¯  rw  z$TestSystematic.test_shi.<locals>.shirî  )r   r   r)  r   r   ©rn  r)  r3   r3   r4   Útest_shi®  rò  zTestSystematic.test_shic                 C   ró  )Nc                 S   rc  rd  rë  r$  r3   r3   r4   r)  ¶  rw  z,TestSystematic.test_shi_complex.<locals>.shirg  rh  r^   r=   )r   r   r)  r   r(   r#   rP  r*  r3   r3   r4   Útest_shi_complexµ  rõ  zTestSystematic.test_shi_complexc                 C   ri  )Nc                 S   rc  rd  rö  r§   r3   r3   r4   ÚsiÁ  rw  z"TestSystematic.test_si.<locals>.si)r   r   r-  r   ©rn  r-  r3   r3   r4   Útest_siÀ  rn  zTestSystematic.test_sic                 C   rû  )Nc                 S   rc  rd  rö  r$  r3   r3   r4   r-  Æ  rw  z*TestSystematic.test_si_complex.<locals>.sirg  rh  r^   r=   )r   r   r-  r   r(   r#   rP  r.  r3   r3   r4   Útest_si_complexÅ  rõ  zTestSystematic.test_si_complexc                 C   s,   dd„ }t tjt|ƒtdtjƒgdd� d S )Nc                 S   ó   t  dd|  ¡S r"  ©r   r#  r§   r3   r3   r4   ÚdilogÒ  r:  z)TestSystematic.test_spence.<locals>.dilogr   rä   r=   )r   r,   r%  r   r   r#   rP  ©rn  r3  r3   r3   r4   Útest_spenceÐ  s   
üzTestSystematic.test_spencec                 C   s&   dd„ }t tjt|ƒtƒ gdd� d S )Nc                 S   r1  r"  r2  r$  r3   r3   r4   r3  Ý  r:  z1TestSystematic.test_spence_complex.<locals>.dilogrä   r=   )r   r,   r%  r   r   r4  r3   r3   r4   Útest_spence_complexÜ  s   
üz"TestSystematic.test_spence_complexc              
   C   sJ   dd„ }t |tjtddƒtddƒtdtd�tddt d�gddd	d
� d S )Nc                 S   sT   || krt jS tƒ �}|jtd� t || ||¡W  d   ƒ S 1 s#w   Y  d S )Nrà  )r#   r¶  r   rä  rå  r,   Úsph_harm)Úlr8  rþ   r;  rè  r3   r3   r4   Ú	spherharmç  s   $þz0TestSystematic.test_spherharm.<locals>.spherharmr   r:   rê   r   rN  ip  rW   )rq   rD   rË   )r   r   r9  r   r   r   )rn  r9  r3   r3   r4   Útest_spherharmæ  s   *
úzTestSystematic.test_spherharmc                 C   s,   t tjttjƒtddƒtddƒgdd� d S )Nç     ˆÃÀrz  r   ç•Ö&è.>r=   )r   r,   Ústruver   r   Ústruvehr   rm  r3   r3   r4   Útest_struvehö  s   
üzTestSystematic.test_struvehc                 C   s4   dd„ }t tjt|ƒtddƒtddƒgddd� d S )	Nc                 S   s\   | dk r(||  k r(t | ƒdkr(tjj}zdtj_t | |¡W |tj_S |tj_w t | |¡S )Nr   rÀ  r´   )r½   r   rÊ   rË   Ústruvel)rP   r2   rÐ   r3   r3   r4   Ú
mp_struvelÿ  s   z/TestSystematic.test_struvel.<locals>.mp_struvelr;  rz  r   r<  Tr°   )r   r,   Ú	modstruver   r   )rn  rA  r3   r3   r4   Útest_struvelþ  s   
ûzTestSystematic.test_struvelc                 C   s*   dd„ }t tj|tddƒgdddd� d S )	Nc                 S   s   t  t  | ¡t  d¡¡S )Nz-0.5)r   rG  r&   r  r§   r3   r3   r4   Úmpmath_wrightomega_real  s   zETestSystematic.test_wrightomega_real.<locals>.mpmath_wrightomega_realr{   gPïâÖäKDg›+¡†›„ö<r   F)r>   rq   r«  )r   r,   rS  r   )rn  rD  r3   r3   r4   Útest_wrightomega_real  s   

úz$TestSystematic.test_wrightomega_realc                 C   s    t tjdd„ tƒ gddd� d S )Nc                 S   s
   t | dƒS )NrJ  )rI  r$  r3   r3   r4   rQ   %  rL  z1TestSystematic.test_wrightomega.<locals>.<lambda>rä   FrÑ  )r   r,   rS  r   rm  r3   r3   r4   Útest_wrightomega"  s   
ûzTestSystematic.test_wrightomegac                 C   s.   t tjttjƒtdddd�tddd�gƒ d S )Nr"   ç    _ BF)ru   rt   r|  r   ©ru   r|  )r   r,   Úzetar   r   r   rm  r3   r3   r4   Útest_hurwitz_zeta+  s
   ýz TestSystematic.test_hurwitz_zetac                 C   s$   t tjdd„ tddƒgddd� d S )Nc                 S   s   | dkr	t  | ¡S t jS rr  ©r   rI  rP  r§   r3   r3   r4   rQ   5  r]   z2TestSystematic.test_riemann_zeta.<locals>.<lambda>r)  r:   Fro   rª  )r   r,   rI  r   rm  r3   r3   r4   Útest_riemann_zeta2  s   

ûz TestSystematic.test_riemann_zetac                 C   s&   t tjdd„ tddƒgdddd� d S )	Nc                 S   s   | dkrt  | ¡d S t jS rr  rK  r§   r3   r3   r4   rQ   >  r  z+TestSystematic.test_zetac.<locals>.<lambda>r)  r:   Fé-   ro   )r«  rË   r>   )r   r,   Úzetacr   rm  r3   r3   r4   Ú
test_zetac;  s   

úzTestSystematic.test_zetacc                 C   ó4   dd„ }t tjt|ƒtddd�tƒ gdddd	� d S )
Nc                 S   s>   t j | ¡} t j |¡}|dkrt j | ¡S t j | |¡| S rd  ©r   rÊ   r  rì   Úpowm1)rE   Úlmbdar3   r3   r4   Ú	mp_boxcoxG  s
   z-TestSystematic.test_boxcox.<locals>.mp_boxcoxr   FrH  r9   r   r<   r_  )r   r,   Úboxcoxr   r   )rn  rT  r3   r3   r4   Útest_boxcoxE  s   
úzTestSystematic.test_boxcoxc                 C   rP  )
Nc                 S   sR   t j | ¡} t j |¡}t j d¡}|dkrt j ||  ¡S t j ||  |¡| S rÚ   rQ  )rE   rS  Úoner3   r3   r4   Úmp_boxcox1pZ  s   z1TestSystematic.test_boxcox1p.<locals>.mp_boxcox1prx   FrH  r9   r   r<   r_  )r   r,   Úboxcox1pr   r   )rn  rX  r3   r3   r4   Útest_boxcox1pX  s   	
úzTestSystematic.test_boxcox1pc                 C   s>   dd„ }t dd„ t|ƒtddƒtddƒgd	d d
d„ fd� d S )Nc                 S   óL   t  |¡}t  | t  d¡d  |¡t  d| t j ¡ }|jdkr$|jS |S ©Nr"   r   r   ©r   Ú	mpmathifyr¤  r  r\  r   rF  rN   ©rD   r2   ÚargÚoutr3   r3   r4   Úmp_spherical_jnm  ó   
ÿ
z9TestSystematic.test_spherical_jn.<locals>.mp_spherical_jnc                 S   r¾  rK   )r,   Úspherical_jnrÛ   ©rD   r2   r3   r3   r4   rQ   w  rë   z2TestSystematic.test_spherical_jn.<locals>.<lambda>r   r9   rg  rh  r  c                 S   s   t  | ¡dkS )Ng#B’¡œÇ;)r#   r½   r$  r3   r3   r4   rQ   |  rR   )rË   r  rÁ  ©rn  rb  r3   r3   r4   Útest_spherical_jnl  s   	

úz TestSystematic.test_spherical_jnc                 C   ó,   dd„ }t dd„ t|ƒtddƒtƒ gƒ d S )Nc                 S   r[  r\  r]  r_  r3   r3   r4   rb  €  rc  zATestSystematic.test_spherical_jn_complex.<locals>.mp_spherical_jnc                 S   ó   t  t| jƒ|¡S rK   )r,   rd  rÛ   rN   re  r3   r3   r4   rQ   Š  r”  z:TestSystematic.test_spherical_jn_complex.<locals>.<lambda>r   r9   ©r   r   r   r   rf  r3   r3   r4   Útest_spherical_jn_complex  ó   	ýz(TestSystematic.test_spherical_jn_complexc                 C   s4   dd„ }t dd„ t|ƒtddƒtddƒgd	d
� d S )Nc                 S   r[  r\  ©r   r^  r´  r  r\  r   rF  rN   r_  r3   r3   r4   Úmp_spherical_yn�  rc  z9TestSystematic.test_spherical_yn.<locals>.mp_spherical_ync                 S   r¾  rK   )r,   Úspherical_ynrÛ   re  r3   r3   r4   rQ   š  rë   z2TestSystematic.test_spherical_yn.<locals>.<lambda>r   r9   g    _ ÂrG  r:   rÐ  rÁ  ©rn  rn  r3   r3   r4   Útest_spherical_yn�  s   	
üz TestSystematic.test_spherical_ync                 C   rh  )Nc                 S   r[  r\  rm  r_  r3   r3   r4   rn  ¡  rc  zATestSystematic.test_spherical_yn_complex.<locals>.mp_spherical_ync                 S   ri  rK   )r,   ro  rÛ   rN   re  r3   r3   r4   rQ   «  r”  z:TestSystematic.test_spherical_yn_complex.<locals>.<lambda>r   r9   rj  rp  r3   r3   r4   Útest_spherical_yn_complex   rl  z(TestSystematic.test_spherical_yn_complexc                 C   s2   dd„ }t dd„ t|ƒtddƒtƒ gddd� d S )	Nc                 S   r[  r\  ©r   r^  r™  r  r\  r   rF  rN   r_  r3   r3   r4   Úmp_spherical_in±  rc  z9TestSystematic.test_spherical_in.<locals>.mp_spherical_inc                 S   r¾  rK   )r,   Úspherical_inrÛ   re  r3   r3   r4   rQ   »  rë   z2TestSystematic.test_spherical_in.<locals>.<lambda>r   r9   gÿÿ‘è¨°6rÕ  rÁ  ©rn  rt  r3   r3   r4   Útest_spherical_in°  s   	
ûz TestSystematic.test_spherical_inc                 C   rh  )Nc                 S   r[  r\  rs  r_  r3   r3   r4   rt  Ã  rc  zATestSystematic.test_spherical_in_complex.<locals>.mp_spherical_inc                 S   ri  rK   )r,   ru  rÛ   rN   re  r3   r3   r4   rQ   Í  r”  z:TestSystematic.test_spherical_in_complex.<locals>.<lambda>r   r9   rj  rv  r3   r3   r4   Útest_spherical_in_complexÂ  rl  z(TestSystematic.test_spherical_in_complexc                 C   s0   dd„ }t dd„ t|ƒtddƒtƒ gdd� d S )	Nc                 S   sR   t  |¡}t  | t  d¡d  |¡t  d| t j ¡ }t  |¡jdkr'|jS |S r\  ©r   r^  r­  r  r\  r   rF  rN   r_  r3   r3   r4   Úmp_spherical_knÓ  s   
ÿz9TestSystematic.test_spherical_kn.<locals>.mp_spherical_knc                 S   r¾  rK   )r,   Úspherical_knrÛ   re  r3   r3   r4   rQ   Ý  rë   z2TestSystematic.test_spherical_kn.<locals>.<lambda>r   rW   r:   rÐ  rÁ  ©rn  rz  r3   r3   r4   Útest_spherical_knÒ  s   	
üz TestSystematic.test_spherical_knz.Accuracy issues near z = -1 inherited from kv.c                 C   s0   dd„ }t dd„ t|ƒtddƒtƒ gdd� d S )Nc                 S   r[  r\  ry  r_  r3   r3   r4   rz  æ  rc  zATestSystematic.test_spherical_kn_complex.<locals>.mp_spherical_knc                 S   ri  rK   )r,   r{  rÛ   rN   re  r3   r3   r4   rQ   ð  r”  z:TestSystematic.test_spherical_kn_complex.<locals>.<lambda>r   r9   rÐ  rj  r|  r3   r3   r4   Útest_spherical_kn_complexã  s   	
üz(TestSystematic.test_spherical_kn_complexN)•Ú__name__Ú
__module__Ú__qualname__ro  rp  ry  r}  rƒ  r„  r†  r‡  r�  r�  r–  rž  r¡  r§  r¨  r®  r±  r²  r¼  r½  rÂ  ró   rÏ  rÒ  r×  rÜ  ÚpytestÚmarkÚxfailrå  rè  ré  rñ  rô  rú  rü  r   r  r  r
  r  r  r  r  r"  r#  r$  r&  r)  r,  r.  r3  r4  r6  r>  r?  rD  rH  rJ  rM  r×   rP  rR  rV  rW  rZ  r^  ra  rc  rf  rh  rm  rp  rr  ru  r}  r€  r„  r‡  rŒ  rŽ  r   r‘  r—  rš  r�  r¡  r¢  r¦  r¨  r«  r¬  Úxfail_on_32bitr±  rµ  r·  r½  rÂ  rÆ  rÈ  rÍ  rÎ  rÒ  rÙ  rÜ  rß  rî  r   r  r  r	  r  r  r  r  r  r  r  r   r&  r'  r(  r+  r,  r/  r0  r5  r6  r:  r?  rC  rE  rF  rJ  rL  rO  rV  rZ  rg  rk  rq  rr  rw  rx  r}  r~  r3   r3   r3   r4   rb  ­  sN   



		#!


						

			


2


	


	


	




5


	

ÿ



	

		
ÿrb  )KÚ__doc__Únumpyr#   Únumpy.testingr   r   r   r   r‚  rˆ   Ú
scipy._libr   Úscipy.specialÚspecialr,   Úscipy.special._testutilsr   r   r	   r
   Úscipy.special._mptestutilsr   r   r   r   r   r   r   r   r   r   Úscipy.special._ufuncsr   r   r   r   r   r   r   ÚImportErrorr5   rF   rV   rc   rv   rŽ   r    r¬   r³   rƒ  ÚslowrÁ   r×   ræ   ró   rû   r   r  r
  r  r  r  r!  r(  r/  r1  rC  rI  rY  r[  r]  r^  rŠ   r‹  rb  r3   r3   r3   r4   Ú<module>   s®    0 ÿ










7
&






