L i= dZddlZddlmZmZmZddlmZddlZddl Z ddl m Z ddl m ZddlmZmZmZmZddlmZmZmZmZmZmZmZmZmZmZddlm Z m!Z!m"Z"m#Z#m$Z$m%Z% ddl&Z&ee&d d Z(ee&d d Z)ee&d dZ*ee&d dZ+ee&ddZ,ee&ddZ-ee&ddZ.ee&ddZ/ee&ddZ0ee&dejbjddZ3ee&ddZ4ee&ddZ5ejbjdee&ddZ6dZ7ee&d d Z8ee&d d!Z9ee&d ejbjdd"Z:ee&d ejbjdd#Z;ee&d d$Z<ee&d d%Z=ee&d ejbjdd&Z>ee&d ejbjdd'Z?ee&d d(Z@ee&d d)ZAee&d d*ZBd+ZCejbjdee&d d,ZDejbjdee&d d-ZEejbjdee&d d.ZFejbjdee&d d/ZGeHd0d01ZIejbjdee&d2Gd3d4ZJy#e'$r ed Z&YwxYw)5z4 Test SciPy functions versus mpmath, if available. N)assert_assert_allclosesuppress_warnings)pi)_pep440) MissingModule check_versionFuncDataassert_func_equal) ArgFixedArg ComplexArgIntArgassert_mpmath_equalnonfunctional_tooslow trace_args time_limitedexception_to_nan inf_to_nan)_sinpi_cospi_lgam1p_lanczos_sum_expg_scaled_log1pmx _igam_facmpmathz0.10c g}tjdddD]y}tjddtjzdD]L}|tjd|zz}|j |t tj|fN{tj|tj}ttj|ddjy) Ni r?dtype)nplogspacelinspacerexpappendcomplexreiarraycdoubler scexpicheck)datasetrpzs e/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/scipy/special/tests/test_mpmath.pytest_expi_complexr6#sG [[a $7Q"%%, 7A"&&A,A NNAwvyy|45 6 77hhwbjj1G RWWgq!$**,z0.19c g}dD]m}tjdddD]Q}tjd5|j ||t tj ||fdddSotj|}ttj|ddd jy#1swYxYw) N)23rdrr$rvIh%<=rtol) r%r&rworkdpsr)floatexpintasarrayr r.expnr0)r1nxs r5test_expn_large_nrI3sG CQ3' CA$ C1eFMM!Q,?&@AB C C CCjj!G RWWgvqu5;;=  C Cs 2B77C c lg}gd}|D]i}|D]b}|D][}|d|zz}tjd5ttj||}ddd|j ||f]dkt j |}td|dddjy#1swYXxYw) N)gXg#?g#@gX@r!xcBtj|j|SNr.hyp0f1realvr4s r5z$test_hyp0f1_gh5764..Us"))AFFA.r7r>rr?r@) rrBr*rQr)r%r,r r0)r1axisrTrHyr4ress r5test_hyp0f1_gh5764rYDsG .D  , ,A ,1H^^C(7!&--1"56C71c{+ , , ,hhwG . 77s B* *B3 c tjddd}tj|d}tj|Dcgc]}t j|dc}}t ||jtdycc}w)NrL-q=r@) r%r'r.rQr,rrastyperC)vvafrTmfs r5test_hyp0f1_gh_1609rcYsd S#r "B 2s B "5Q6==C(5 6BB %(u56sBz1.1.0c`g}tjddD]}tjdddD]t}| }|j||dt t j ||df| |zdz }|j||dt t j ||dfvdD]<}dD]5}|j||dt t j ||df7>tj|}ttj |dd d d jy) Nrr$)%rKrrLr$r)rKrrLr$?r@rr$rV瞯<-a=rAatol) r%aranger'r)rCrhyperur,r r.r0)r1rGbas r5test_hyperu_around_0rwfsG YYr1 ERB' EAA NNAq!U6==Aq+A%BC DQ A NNAq!U6==Aq+A%BC D  EE0E5 EA NNAq!U6==Aq+A%BC D EEhhwG RYYAEFLLNr71.0.0c ddg}|ttjgddz }|Dcgc]*\}}}}||k(rt||k(r|dkr |dk7r||||f,}}}}}t d }|Dcgc]$}|t t j|i|fz&}}tj|tj }ttj|d dd jycc}}}}wcc}w)N)rrzffffff?)rr|r{)rr$gffffffr;)repeatrr}T) eliminater"rr$rrn绽|=r@)list itertoolsproductrounddictrCrhyp2f1r%r,float64r r.r0)ptsrvrucrHkwr3r1s r5test_hyp2f1_strange_pointsr}s  C4 !!"5a@ AAC'*  #Aq! 6eAh!mA!u* Aq!  C   B>ABqE&--1b1244BGBhhwbjj1G RYYAE:@@B  Cs /C2 5)C:z0.13c fgd}|Dcgc]!}|ttj|fz#}}tj|tj }tj d5ttj|dddjdddycc}w#1swYyxYw) N)r$rrnr)UUUUUU?gUUUUUU?g?g?)?rLg?gX <ݚ?)rr|rn)rrr|rn)rririrnr)gx&?rzreg333333?)rrr+?)rrrrz)rrnrfGz?)rkrKrnr)rrlg r)g*4]92@g|O%@gCu?)rhr)rr%@r)rzrr$?)rzrr$rj)r rfr)rrrfrj)rLgprkgm ˟?r"ignoreinvalidrr;rr@) rCrrr%r,rerrstater r.r0)rr3r1s r5test_hyp2f1_real_some_pointsrs C.9<<1qE&--+,..DDFGG=GGs&B",-B''B00.14c <gd}d}|Dcgc]4}tt||ttj|fz6}}t j |t j}ttj|dddjycc}w)N))p)r:r)rgwJ)r|rr)rrrhrcNt|trt|d|dz S|S)Nrr$) isinstancetuplerCrHs r5fevz&test_hyp2f1_some_points_2..fevs( a 1;1% %Hr7r"rr;rr@) rmaprCrrr%r,rr r.r0)rrr3r1s r5test_hyp2f1_some_points_2rs} C  JMMAuSa[!U6==!+<%=$??MGMhhwbjj1G RYYAE:@@BNs9Bc g}dD]O}dD]H}dD]A}dD]:} ttj||||}|j |||||f<CJQt j |t j}t jd5ttj|dd d d jdddy#t$rYwxYw#1swYyxYw) N)rreg?rfr)grzr$g@)rrrfgffffff4@)rg)\(Gzrg333333?gffffff?rkrr"rrrr;& .>TrAignore_inf_sign) rCrr Exceptionr)r%r,rrr r.r0)r1rvrurr4rTs r5test_hyp2f1_real_somersG (4# 4A( 4C4A!!&--1a";<NNAq!Q?3 4 4 44hhwbjj1G X &/GY!% '',uw// %! ! //s!C .C C C C!z0.12c td}tj|dftj}tjj dtjj d||dddf<tjj d||dddf<tjj d||dddf<dtjj |zdz |dddf<|dddfxxd tjjd|zzcc<|dddfxxd tjjd|zzcc<|dddfxxd tjjd|zzcc<|D]}tjd krJt|ddjt|dkDrt|ddj|d<ttjt|dd |d <tt j|d d d j#y)Nrfrkrr$rrnrzrr;rrr@)r%zerosrrandomseedparetorandrandintr __version__absmaxrCrrr r.r0)npointsr1dss r5test_hyp2f1_real_randomrsGhh|RZZ0GIINN4II$$S'2GAqDMII$$S'2GAqDMII$$S'2GAqDMbiinnW--1GAqDM AqDMb299,,Q888M AqDMb299,,Q888M AqDMb299,,Q888M5    &2bq6{ 3r!u:-BrF )1fmmU2bq6]341 5 RYYqt<BBDr7ctjjtjj}} dtj_t j t j dddt j ddd\}}t j t jdddt jddd\}}tj|j|jfdtj|j|jfzz}ttjd |d d ttjd |d d ||ctj_tj_y#||ctj_tj_wxYw)NFrr$ ig?r!c>ttj|SrO)r*rerfrs r5rUz"test_erf_complex..sGFJJqM,Br7Fr? vectorizedrAc>ttj|SrO)r*rerfcrs r5rUz"test_erf_complex..sWV[[^-Dr7)rmpdpsprecr%meshgridr'r&r_ravelr r.rr)old_dpsold_precx1y1x2y2pointss r5test_erf_complexrs/ vyy~~XG : R[[a4bkk#q"6MNBR[[b"5r{{3B7OPBrxxz"((*,-255RXXZ9O3P0PP"&&"BF%* 8"''#Df%* 8)0% vyy~% vyy~s D?F!!-Gz0.15cDg}dD]{}|jdd|fdd|fdd|fdd|fdd|fdd|fdd|fdd|fdd|fdd |fd d |fd d |fd d |fdd |fd d|fd d|fd d|fdd|fd d|fd d|fd d|fdd|fd d|fd d|fd d|fdd|fg}d}|Dcgc]}|||d|d|dfz}}tj|tj}d}tjd5t ||dd ddj dddycc}w#1swYyxYw) N)rgmư>gL7A`?r$r$rzr|g333333?g333333grrrnrfrrerig @g&@g g&cd|t|k(r |dk(r|dk(ryytj|||SNr$r)intrlegenp)numurHs r5mplegenpztest_lpmv..mplegenp-s3 R=Q!VQw}}RQ''r7rrr"cVtj|jt||SrO)r.lpmvr_r)rrrHs r5evfztest_lpmv..evf9swwryy~r1--r7rrrmr+=rq)extendr%r,rrr r0)rrHrr3r1rs r5 test_lpmvr s C ,  1I AJ AJ QK QK aL aL qM AJ AJ 1I AJ AJ QK AJ QK QK aL QK aL aL qM aL qM qM N5   <(;>>QqHQqT1Q41.00>G>hhwbjj1G. X &KgwEBHHJKK ? KKs D( DDc tjjdtjtjdddtjdddtjdddtj dd dtj dd dd zdd d d df }|}tj tj|dddf|dddfjddj}tjjtjj}} dtj_ ttj d|dddttj"d|dd||ctj_ tj_ y#||ctj_ tj_ wxYw)Nr8r<r;rrrzr$rrLgffffffrg33333Yg3333rc@ttj||SrO)rCrbetarvrus r5rUztest_beta..XsuV[[A->'?r7FrT)rrArc xttjttj||SrO)rCrlogrrrs r5rUztest_beta..`s$vzz#fkk!Q.?*@ABr7r)r%rrrr&rsr,broadcast_arraysreshapeTrrrrr r.rbetaln)rurvabrrs r5 test_betarDsaIINN4 bkk$Q'kk#r1%kk"a#iiR#iiR#c)$FH - .A A "%%a$i46; < D DQ K M MB vyy~~XG: "''?%*$*.  0  II B   )0% vyy~% vyy~s 1AF11-Gg?c 0ttjgdz}tjddtjzd}tj ||\}}|tj d|zz}tjd|zd|zfj}|Dcgc]"}|ttj|f$}}tj|}ttj|dddjycc}w) N)gg{Gzrg{Gz?g?rrrgr!r$vIh%,=r@)LOGGAMMA_TAYLOR_RADIUSr%r,r'rrr(rflattenr*rloggammar r.r0r2thetadzr4z0r1s r5test_loggamma_taylor_transitionros *E!FFA KK1RUU7B 'E{{1e$HAu 266"U(  B a"fa"fn%%'A<=>bGFOOB/01>G>hhwG R[['1ae4::<?s('Dc Ptjdtjtd}tjddtj zd}tj ||\}}|tjd|zz}tjd|zd|zfj}|Dcgc]"}|ttj|f$}}tj|}ttj|ddd j!ycc}w) Nirrrrgr!r$rr@)r%r&log10rr'rrr(rrr*rrr,r r.r0rs r5test_loggamma_taylorrs C"892>A KK1RUU7B 'E{{1e$HAu 266"U(  B a"fa"fn%%'A<=>bGFOOB/01>G>hhwG R[['1ae4::<?s8'D#c tjtjddd dtjdddf}|j}tj||\}}|d|zz}tj dddj ddd}|tj|f|jzzj}tjd5|Dcgc]"}|ttj|f$}}dddtj}tt j|ddd j#ycc}w#1swYPxYw) Nrzrnrr!iVr$r=r^r@)r%rr&copyrrsrdstacksizerrrBr*rgammar,r r.r0)dxdyrrr4rr1s r5test_rgamma_zerosr s(  BQ''BKKR,CC DB B [[R FB beB IIar " * *1a 4E B5+, ,557A  A>?@B b 123@@AhhwG RYYAE288:AAAs$E!)'EE!E!!E*c tjtjd}t|g}tjtjd}|j t|t j |}t jdt jddd dt jddddf}|j}t j||\}}|d |zz}|t j|f|jzzj}tjd 5|Dcgc]"}|ttj|f$}}dddt j }t!t"j|dd d j%ycc}w#1swYPxYw)NrkrKgQοrzrrgQ?r!r r$rr@)rfindrootdigammarCr)r%r,rr&rrrr rrBr*r r.r0)rootrootsr r rr4rr1s r5test_digamma_rootsrs] ??6>>3 /D 4[ME ??6>>4 0D LLt HHUOE ur{{2sB//BKKR4LdR SB B [[R FB beB B5+, ,557A  B?@ABr 234AABhhwG RZZ!QU399;BBBsF>'F9-F>9F>>Gc fttj}tjddd }tj tjddd dtjdddf}tj ||\}}|d|zzj}tjd5|Dcgc]}|t||f}}dddtj}ttj|dd d jycc}w#1swYPxYw) N,r=rrrfr!(r$r?r@)rrrr%r&rrrrBr*rEr r.r0)rrHrWr4rr1s r5test_digamma_negrealrs v~~.G S#s ##A r{{1b!$$aRA)>>?A ;;q! DAq RTA  ;89:"B ,-::;jj!G RZZ!QU399;;;;s7D'<D"D'"D''D0c tjddd }tjgd}tj||\}}|d|zzj }t j d5|Dcgc]"}|tt j|f$}}dddtj}ttj|ddd jycc}w#1swYPxYw) Nrrr=)gffffffgg@gffffff@r!r rr$r?r@) r%r&r,rrrrBr*rrEr r.r0rHrWr4rr1s r5test_digamma_boundaryrs S#s ##A '(A ;;q! DAq RTA  B?@ABr 234AABjj!G RZZ!QU399;BBBs4C19'C, C1,C11C:c6d}tjd|zd|zd}|j}tj||\}}|j |j }}t j d5t||Dcgc])\}}||tt j||df+}}}dddtj}ttj|ddd jycc}}w#1swYQxYw) NrgrLrr9r=Tru regularizedr>r^r@)r%r'rrrrrBziprCgammaincr,r r.r0)smallrvrHa0x0r1s r5test_gammainc_boundaryr%s E CIqw+A A ;;q! DAq 99; qA  ,!$Q,r2E&//""MNO,,,hhwG R[['6159??A ,,,s>D.D <D DDc d}tjdd}tjddtz}dtj|tjd|zzj }tj |Dcgc] }|||fc}}ttj|ddd jycc}w) NcFttjdd|z SNrr$)r*rpolylogr4s r5spencez"test_spence_circle..spencesv~~aQ/00r7rLrkrrr$r!rr@) r%r'routerr(rrEr r.r+r0)r+r2rr4rr1s r5test_spence_circler-s 1 CA KK1R4 E RXXa5) * *335AjjQ7r2vbz*78G RYYAE288:8sC c tjtj}tjtj ddd dtj dddf}|j }tj||\}}|d|zz}tjdddjddd}|tj|f|jzzj}tj|Dcgc]"}|ttj |f$c}}t#t$|ddd |z j'ycc}w) Nrrrnr!r=r$rzrr@)r%finforCepsrr&rrrsrrr rrEr*rsinpir rr0r1r r rrr4rr1s r5test_sinpi_zerosr4s ((5/  C  AsA&&2;;sAq+AA BB B [[R FB beB IIdC # + +Aq" 5E B5+, ,557Ajj$%' wv||B'789'(G VWa3/557's'Ec tjtj}tjtj ddd dtj dddf}|j }tj||\}}|d|zz}tjddddzjddd }|tj|f|jzzj}tj|Dcgc]"}|ttj |f$c}}t#t$|ddd |z j'ycc}w) Nrrrnr!r/r=r$rLrzrr@)r%r0rCr1rr&rrrsrrr rrEr*rcospir rr0r3s r5test_cospi_zerosr7%s ((5/  C  AsA&&2;;sAq+AA BB B [[R FB beB YYtS! $s * 3 3Aq" =E B5+, ,557Ajj$%' wv||B'789'(G VWa3/557's'Ec d}d}tjddd}tjtjddd dtjdddf}g}|D]G}t t j |}|D]"}||z}|j|||||f$Itj|}t||d d d jy) Nc4tj||dSNrr.ellipjums r5dnz"test_dn_quarter_period..dn:syyAq!!r7cDttjd||SNr@r=)rCrellipfunr=s r5 mpmath_dnz)test_dn_quarter_period..mpmath_dn=sV__TQ!455r7rr$rgrzrrr>rrr@) r%r'rr&rCrellipkr)rEr r0) r@rDr?dur1m0u0du0r3s r5test_dn_quarter_periodrJ8s"6 Aq"A  BR((!R[[b"-EE FBG6 6==$ % 6CSA NNAr9Q#34 5 66 jj!G R&!%0668r7c`tj|5tj|}tj|jtj z dtj zz }tj tj||}ddd|S#1swYSxYwr:)rrBmpcceilimagrlambertwr()r4runwindrXs r5_mpmath_wrightomegarQQsy  5 JJqMaffvyy01VYY;?@oofjjmV45 J 5 Js BB##B-c  tjddd }tjtjtjg}tjtjtj g}tjtj tjg}tjtj tj g}t dD]}|j tj|dtj|j tj|dtj |j tj|dtj|j tj|dtj tj||||f}tj||\}}|d|zzj}tj|Dcgc]}|tt|dfc}} ttj| ddd j!ycc}w) Nrrr9rzr!r$:0yE>r@)r%r& nextafterrinfranger)hstackrrrEr*rQr r. wrightomegar0) rH picut_above picut_below npicut_above npicut_belowirWr4rr1s r5test_wrightomega_branchr_Ys RB A<<rvv./K<<w/0KLL"%%01LLL"%%"&&12L 2YE2<< B@A2<< B"&&ABBLLb)9266BCBLLb)9BFF7CD E ; \<HIA ;;q! DAq RTAjj$%' w':2r'BCD'(G R^^Wa6<<>'s.Jc tjdd}tjddtjz}tj||\}}|d|zzj }tj |Dcgc]}|t t|dfc}}ttj|dddjycc}w) Nr|r$rr!rSrror@ r%r'rrrrEr*rQr r.rYr0rs r5test_wrightomega_region1rbps BA AqwA ;;q! DAq RTAjj$%' w':2r'BCD'(G R^^Wa7==?'Cc tjdd}tjdtjzd}tj||\}}|d|zzj }tj |Dcgc]}|t t|dfc}}ttj|dddjycc}w) Nr|r$rzr!rSrror@rars r5test_wrightomega_region2res BA BruuHb!A ;;q! DAq RTAjj$%' w':2r'BCD'(G R^^Wa7==?'rcc tjdddtjddd}}tj||\}}|d|zzj}tj|Dcgc]"}|t t j|f$c}}ttj|dddjycc}w)Nrzr$rSr!rr?r@) r%r'rrrEr*rrOr r.r0rs r5test_lambertw_smallzrgs ;;r1b !2;;r1b#9qA ;;q! DAq RTAjj$%' wvr':;<'(G R[['1ae4::<'s1'C r<maxprecmaxtermsz0.17cveZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZej<j?dddZ dZ!ej<j?ddd Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7Z9d8Z:d9Z;d:Zd=Z?d>Z@d?ZAd@ZBdAZCdBZDdCZEdDZFdEZGdFZHdGZIdHZJdIZKdJZLdKZMdLZNdMZOdNZPej<j?dOdPZQdQZRej<j?dOdRZSeTdSZUdTZVdUZWej<j?ddVdWZXdXZYdYZZdZZ[ej<j?dOd[Z\eTd\Z]ej<j?dOd]Z^ej<jd^d_Z`d`ZadaZbej<j?dOdbZcdcZdddZedeZfeTdfZgdgZhej<jdhdiZidjZjeTdkZkdlZldmZmdnZndoZoej<j?ddpdqZpeTdrZqdsZrdtZsej<j?dOduZtej<j?ddvdwZudxZvej<j?ddydzZwd{Zxd|Zyej<j?d}~dZzdZ{dZ|dZ}dZ~dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZej<j?dddZy)TestSystematicctdtjtddgdtdtjtddgy) Nc2tj|dSNrr.airyr*s r5rUz,TestSystematic.test_airyai..bggajmr7חחAh㈵>r@c2tj|dSrorpr*s r5rUz,TestSystematic.test_airyai..rrr7@@@)rrairyair selfs r5 test_airyaizTestSystematic.test_airyaisC3"MM s^,!% ' 3"MM s^, .r7cNtdtjtgy)Nc2tj|dSrorpr*s r5rUz4TestSystematic.test_airyai_complex..rrr7)rrryrrzs r5test_airyai_complexz"TestSystematic.test_airyai_complexs3"MM'\N ,r7cptddtddgdtddtd d gy) Nc2tj|dSNr$rpr*s r5rUz2TestSystematic.test_airyai_prime..rrr7c0tj|dSNr$) derivativerryr*s r5rUz2TestSystematic.test_airyai_prime.."MM!:r7rsrtrur@c2tj|dSrrpr*s r5rUz2TestSystematic.test_airyai_prime..rrr7c0tj|dSrrr*s r5rUz2TestSystematic.test_airyai_prime..rr7rwrxrr rzs r5test_airyai_primez TestSystematic.test_airyai_prime?36; s^,!% ' 36; s^, .r7c4tddtgy)Nc2tj|dSrrpr*s r5rUz:TestSystematic.test_airyai_prime_complex..rrr7c0tj|dSrrr*s r5rUz:TestSystematic.test_airyai_prime_complex..rr7rrrzs r5test_airyai_prime_complexz(TestSystematic.test_airyai_prime_complex36;'\N ,r7cptddtddgdtddtd d gy) Nc2tj|dSr:rpr*s r5rUz,TestSystematic.test_airybi..rrr7c,tj|SrOrairybir*s r5rUz,TestSystematic.test_airybi.."MM!,r7rsrtrur@c2tj|dSr:rpr*s r5rUz,TestSystematic.test_airybi..rrr7c,tj|SrOrr*s r5rUz,TestSystematic.test_airybi..rr7rwrxrrzs r5 test_airybizTestSystematic.test_airybis?36- s^,!% ' 36- s^, .r7c4tddtgy)Nc2tj|dSr:rpr*s r5rUz4TestSystematic.test_airybi_complex..rrr7c,tj|SrOrr*s r5rUz4TestSystematic.test_airybi_complex..rr7rrzs r5test_airybi_complexz"TestSystematic.test_airybi_complexs36-'\N ,r7cptddtddgdtddtd d gy) Nc2tj|dSNrnrpr*s r5rUz2TestSystematic.test_airybi_prime..rrr7c0tj|dSrrr*s r5rUz2TestSystematic.test_airybi_prime..rr7rsrtrur@c2tj|dSrrpr*s r5rUz2TestSystematic.test_airybi_prime..rrr7c0tj|dSrrr*s r5rUz2TestSystematic.test_airybi_prime..rr7rwrxrrzs r5test_airybi_primez TestSystematic.test_airybi_primerr7c4tddtgy)Nc2tj|dSrrpr*s r5rUz:TestSystematic.test_airybi_prime_complex..rrr7c0tj|dSrrr*s r5rUz:TestSystematic.test_airybi_prime_complex..rr7rrzs r5test_airybi_prime_complexz(TestSystematic.test_airybi_prime_complexrr7cdttjtdt ddgy)Nc8tjd|fitSro)rbeiHYPERKWr*s r5rUz)TestSystematic.test_bei..vzz!Q7R'7Rr7rwrx)rr.rrr rzs r5test_beizTestSystematic.test_bei%BFF,-RS s^, .r7cdttjtdt ddgy)Nc8tjd|fitSro)rberrr*s r5rUz)TestSystematic.test_ber..rr7rwrx)rr.rrr rzs r5test_berzTestSystematic.test_berrr7c>tddtddgddy)NcVtjt|t|SrO)r. bernoullirrGs r5rUz/TestSystematic.test_bernoulli..sbll3q6&:3q6&Br7cPttjt|SrO)rCrrrrs r5rUz/TestSystematic.test_bernoulli..seF,<,.&..A*I*Ir7}Ô%I}Ô%ITgJDrr)rr.ivrr rzs r5 test_besselizTestSystematic.test_besselis. EE I J   '  r7c\tdtdtddtgy)NcBtj|j|SrO)r.rrRrSs r5rUz5TestSystematic.test_besseli_complex..qvvq)r7c8tj||fitSrOrrSs r5rUz5TestSystematic.test_besseli_complex.. rr7rrrrr rrzs r5test_besseli_complexz#TestSystematic.test_besseli_complex' ) I J   . r7c ttjtdt ddt ddgdttjtdt ddt d d gdd y) Nc8tj||fitSrOrbesseljrrSs r5rUz-TestSystematic.test_besselj..rr7rrrwrxTrc8tj||fitSrOrrSs r5rUz-TestSystematic.test_besselj..rr7rsrtru)rrA)rr.jvrr rzs r5 test_besseljzTestSystematic.test_besselj sg EE I J  T3 0    EE I J  T3 0   r7cXtdtdttgy)NcBtj|j|SrO)r.rrRrSs r5rUz5TestSystematic.test_besselj_complex.. rr7c8tj||fitSrOrrSs r5rUz5TestSystematic.test_besselj_complex..!rr7rrzs r5test_besselj_complexz#TestSystematic.test_besselj_complexs" ) I J UJL ! r7c ttjtjt ddt dt jgddyNrr<rFr^nan_okrA)rr.kvrbesselkr r%rVrzs r5 test_besselkzTestSystematic.test_besselk%s6 EE NN s^SBFF^ ,  r7c ttjtjt ddt dtjgddyr) rr.knrrrr r%rVrzs r5test_besselk_intzTestSystematic.test_besselk_int.s7 EE NN D# Arvv /  r7c\tdtdtddtgy)NcBtj|j|SrO)r.rrRrSs r5rUz5TestSystematic.test_besselk_complex..9rr7c8tj||fitSrO)rrrrSs r5rUz5TestSystematic.test_besselk_complex..:rr7rrrrzs r5test_besselk_complexz#TestSystematic.test_besselk_complex7rr7c d}ttjt|t ddt ddgdy)Ncttj||fit}t |dkDr&t j t j|z}t |dk(r|dk(rt jS|S)NقnQ:Br) rCrbesselyrrr%rVsignnanrTrHr2s r5 mpbesselyz.TestSystematic.test_bessely..mpbessely?s\fnnQ5W56A1v~FFRWWQZ'1v{qAvvv Hr7rrrsrtr)rr.yvrr r{rs r5 test_besselyzTestSystematic.test_bessely>s8   EE Y '  T3 0  r7c`d}tdt|ttgdy)Ncttj||fit}t |dkDrGt j d5t jt j|z}ddd|S|S#1swY|SxYw)Nrrr) r*rrrrr%rrVrrs r5rz6TestSystematic.test_bessely_complex..mpbesselyPsgq!7w78A1v~[[2,+A,H1H,Hs 'A<<BcBtj|j|SrO)r.rrRrSs r5rUz5TestSystematic.test_bessely_complex..Xrr7i:rrrs r5test_bessely_complexz#TestSystematic.test_bessely_complexOs+   ) Y ' UJL !  r7c dd}tdt|tddtddgy)Ncttj||}t|dk(r|dk(rtj S|Sro)rCrrrr%rrs r5rz2TestSystematic.test_bessely_int..mpbessely_s6fnnQ*+A1v{qAvvv Hr7c@tjt||SrO)r.ynrrSs r5rUz1TestSystematic.test_bessely_int..fss1vq)r7r}rsrtrrrr rs r5test_bessely_intzTestSystematic.test_bessely_int^s1   ) Y ' E4 #dC. 1 r7cgdfd ttjfdttgddttjt j dddy) Nc |dks|dkrtjS|dks|dkrTtt||zdzdk(r7|r5j t|t|ftjSt j ||S)Ngmrr$)r%rrrCr)rr)rvrunonzero bad_pointss r5rz&TestSystematic.test_beta..betans{5yAIvv AQSq1u%6%:q$@%%uQxq&:;66M;;q!$ $r7c||dSNT)r)rvrurs r5rUz*TestSystematic.test_beta..saD1r7rTrrdy=)rrrrF)rr.rr r%r,)r{rrs @@r5rzTestSystematic.test_betaks[  %  GG 1 UCEN    GG  HHZ    r7cttjtt dt t t gy)Nc6tj||d|dS)NrTrrbetaincrvrurHs r5rUz-TestSystematic.test_betainc..FNN1aA4$Pr7)rr.r rrr rzs r5 test_betainczTestSystematic.test_betaincs: JJ LN P  UCE35 ! r7cttjtt dt t t gdy)Nc6tj|||ddS)Nr$Tr r rs r5rUz.TestSystematic.test_betaincc..rr7rr)rr.betainccrrr rzs r5 test_betaincczTestSystematic.test_betainccs= KK LN P  UCE35 ! r7cgdfd ttjfdttgdttjt j ddy)Nc zt|dt|dzzkDrtjS||krstt||z tjt||z z dkr7|r5j t|t|ftjSt j||S)Nrtr$ro)rr%rrCrr)rbinomial)rGkrrs r5rz+TestSystematic.test_binom..binomials1vSVaZ((vv 1uU1Q3Z"((51:*>>?%G%%uQxq&:;66M??1a( (r7c||dSrr)rGrrs r5rUz+TestSystematic.test_binom..s!Q5r7rrrrrrr)rr.binomr r%r,)r{rrs @@r5 test_binomzTestSystematic.test_binomsU  )  HH 5 UCEN    HH  HHZ   r7c\tdtdttgdy)Nc@tjt||SrO)r. eval_chebytrrGrHs r5rUz0TestSystematic.test_chebyt_int..A2r7c8tj||fitSrO)rchebytrr!s r5rUz0TestSystematic.test_chebyt_int..&--1*H*Hr7r9rrrzs r5test_chebyt_intzTestSystematic.test_chebyt_int% 2 H I Xsu   r7Fz'some cases in hyp2f1 not fully accurate)runreasonchttjdtddtgdy)Nchtttj||fitSrO)rrrr$rr!s r5rUz,TestSystematic.test_chebyt..2 /r7e'r)rr.r r rzs r5 test_chebytzTestSystematic.test_chebyts+ NN s^SU #  r7c\tdtdttgdy)Nc@tjt||SrO)r. eval_chebyurr!s r5rUz0TestSystematic.test_chebyu_int..r"r7c8tj||fitSrO)rchebyurr!s r5rUz0TestSystematic.test_chebyu_int..r%r7r9rrrzs r5test_chebyu_intzTestSystematic.test_chebyu_intr'r7cdttjdtddtgy)Nchtttj||fitSrO)rrrr5rr!s r5rUz,TestSystematic.test_chebyu..r,r7r-r.)rr.r3r rzs r5 test_chebyuzTestSystematic.test_chebyus( NN s^SU #  r7cd}t|tjtgt|tjt gdgy)Nc2tj|dSrr.shichirs r5chiz$TestSystematic.test_chi..chi99Q<? "r7gU@XgV@)rrr>r r r{r>s r5test_chizTestSystematic.test_chi4 #CceW5Ch7Q.R-STr7c d}t|tjtt t j dt t j dgdy)Nc2tj|dSrr<r*s r5r>z,TestSystematic.test_chi_complex..chir?r7rsrtr^r@)rrr>rr*r%rVrBs r5test_chi_complexzTestSystematic.test_chi_complexC #   JJ .0D E F  r7cVd}t|tjtddgy)Nc2tj|dSrr.sicirs r5ciz"TestSystematic.test_ci..ci771:a= r7rsrt)rrrMr r{rMs r5test_cizTestSystematic.test_cis" ! B CcN+;.cirNr7rsrtrTr@)rrrMrr*r%rVrOs r5test_ci_complexzTestSystematic.test_ci_complexsC !   II rvvg.RVV0D E F  r7ctjtj}t t t jtgdd|zyNFrr) r%r0rCr1rrrr6r r{r1s r5 test_cospizTestSystematic.test_cospis2hhuo!!FFLL35'%aPSeTr7cZtttjt gddy)NFr?r)rrrr6rrzs r5test_cospi_complexz!TestSystematic.test_cospi_complex!  LL \N  r7cttjttjt gddy)Nr^r9rAr)rr.rrrr rzs r5 test_digammazTestSystematic.test_digammas* JJ V^^ , UG  r7cd}ttjttjt gdd|y)Nctj|jdktj|jdkzddS)NrgQ?FT)r%whererRrrNr*s r5 param_filterz9TestSystematic.test_digamma_complex..param_filter's388QVVaZBFF166NT,ABE4P Pr7r?rrArra)rr.rrrr)r{ras r5test_digamma_complexz#TestSystematic.test_digamma_complex$s5 Q  JJ V^^ , \N%  r7clttjtjt gdy)Nrr@)rr.exp1re1r rzs r5test_e1zTestSystematic.test_e13s" GG II UG  r7c ttjtjt t tj dt tjdgdttjtjtjddddddftjdtjd d d tjd d d  fd zzjdttjtjtjddddzdy)Nrsrtrr@r9rrr=rr!ir/y) rr.rerrfrr*r%rVr'rr&rrzs r5test_e1_complexzTestSystematic.test_e1_complex;s GG II .0D E F    GG II [[b# &q$w /uuQ B2.RB1G0GGHKLMRUW    GG II [[c5 )B .  r7c ttjdtt j t j tjj t j t j tjjgttjdt jdddddtjgd tt jtjtjttjtj dk(y) Ncf|dk7rtj||z StjdSNrz1.0rexpm1mpfrs r5rUz,TestSystematic.test_exprel..V&16fll1oa'vzz%7Hr7rcf|dk7rtj||z StjdSrorprs r5rUz,TestSystematic.test_exprel..\rsr7r^gW:rgmBgyCxDrr@) rr.exprelr r%rr0rrr,rVrisinfrzs r5 test_exprelzTestSystematic.test_exprelSs II H BFF288BJJ/334466"((2::.2235 6  II H HHeUAtT266: ;  266*+, 266'"a'(r7c ttjtjt t t j dt t jdgy)NccA)rr.rqrrr*r%rVrzs r5test_expm1_complexz!TestSystematic.test_expm1_complexcs= HH LL .0D E F r7cRttjdtgdy)Nc2tj|dzSrrrrs r5rUz3TestSystematic.test_log1p_complex..nsfjj1or7<r)rr.log1prrzs r5test_log1p_complexz!TestSystematic.test_log1p_complexks HH % \N  r7c@ttdtgddy)Nc8tj|dz|z Srr~rs r5rUz-TestSystematic.test_log1pmx..vsfjjQ'!+r7rr)rrA)rrr rzs r5 test_log1pmxzTestSystematic.test_log1pmxss  + UG  r7clttjtjt gdy)Nrr@)rr.r/rr+r rzs r5test_eizTestSystematic.test_ei|sBGGVYYeDr7c ttjtjt t tj dt tjdgdy)Nrsrtrr@) rr.r/rr+rr*r%rVrzs r5test_ei_complexzTestSystematic.test_ei_complexs@ GG II .0D E F  r7clttjtjt dgy)Nrru)rr.elliperr rzs r5 test_ellipezTestSystematic.test_ellipesBIIv}}sSzlCr7cttjtjt ddt dgy)Nrwrxrrrr. ellipeincrrr rzs r5test_ellipeinczTestSystematic.test_ellipeincs&BLL&--#dC.#PS*9UVr7czttjtjt t gyrOrrzs r5test_ellipeinc_largephiz&TestSystematic.test_ellipeinc_largephiBLL&--#%Hr7c~ttjtjt ddt gyNrwrxrr. ellipkincrellipfr rzs r5 test_ellipfzTestSystematic.test_ellipfs#BLL&--#dC.#%9PQr7czttjtjt t gyrOrrzs r5test_ellipf_largephiz#TestSystematic.test_ellipf_largephirr7cttjtjt dgttj dt dgdy)Nrrc2tjd|z Sr)rrE)r?s r5rUz,TestSystematic.test_ellipk..sfmmAE*r7g)rvrr)rr.rErr ellipkm1rzs r5 test_ellipkzTestSystematic.test_ellipks:BIIv}}sSzlC KK * 3ZL  r7cpd}ttj|tddtdgdy)Nc0tjd||Srorellippiphir?s r5rz0TestSystematic.test_ellipkinc..ellipkinc>>!S!, ,r7rwrxrrTrrr.rr r{rs r5test_ellipkinczTestSystematic.test_ellipkincs. - LL  s^S3Z (  r7cld}ttj|ttdgdy)Nc0tjd||Srorrs r5rz9TestSystematic.test_ellipkinc_largephi..ellipkincrr7rrTrrrs r5test_ellipkinc_largephiz&TestSystematic.test_ellipkinc_largephis* - LL  UC#J   r7c Xd}td|tddtddgd y) Nc>|dk(rytjd||S)Nrsnr=rrCr=s r5rz+TestSystematic.test_ellipfun_sn..snsAvtqA66r7c4tj||dSror;r=s r5rUz1TestSystematic.test_ellipfun_sn..1a+r7..Arr$rrTr@r)r{rs r5test_ellipfun_snzTestSystematic.test_ellipfun_sns. 7  +  s^S1] +  r7c Ttddtddtddgd y) Nc4tj||dSrr;r=s r5rUz1TestSystematic.test_ellipfun_cn..rr7c2tjd||S)Ncnr=rr=s r5rUz1TestSystematic.test_ellipfun_cn..a8r7rrrr$rrTr@rrzs r5test_ellipfun_cnzTestSystematic.test_ellipfun_cn' + 8 s^S1] +  r7c Ttddtddtddgd y) Nc4tj||dSr:r;r=s r5rUz1TestSystematic.test_ellipfun_dn..rr7c2tjd||SrBrr=s r5rUz1TestSystematic.test_ellipfun_dn..rr7rrrr$rrTr@rrzs r5test_ellipfun_dnzTestSystematic.test_ellipfun_dnrr7cNttjdtgy)Nc,tj|SrOrrr*s r5rUz)TestSystematic.test_erf..fjjmr7)rr.rr rzs r5test_erfzTestSystematic.test_erfsBFF$;ceWEr7cRttjdtgdy)Nc,tj|SrOrr*s r5rUz1TestSystematic.test_erf_complex..rr7r<r)rr.rrrzs r5rzTestSystematic.test_erf_complexsBFF$;jl^sSr7cdttjtdt gdy)Nc,tj|SrOrrr*s r5rUz*TestSystematic.test_erfc..v{{1~r7r?r@)rr.rrr rzs r5 test_erfczTestSystematic.test_erfcs$ GG 5 6 UG  r7cdttjtdt gdy)Nc,tj|SrOrr*s r5rUz2TestSystematic.test_erfc_complex..rr7r<r)rr.rrrrzs r5test_erfc_complexz TestSystematic.test_erfc_complexs$ GG 5 6 \N  r7clttjtjt gdyNr<r)rr.erfirr rzs r5 test_erfizTestSystematic.test_erfisBGGV[[35'SAr7clttjtjt gdyr)rr.rrrrzs r5test_erfi_complexz TestSystematic.test_erfi_complexsBGGV[[:<.CHr7cdttjtdt gdy)Nc,tj|SrO)rncdfr*s r5rUz*TestSystematic.test_ndtr..rr7r<r)rr.ndtrrr rzs r5 test_ndtrzTestSystematic.test_ndtrs$ GG 5 6 UG  r7c ttjdtt ddt ddgdy)Nc`tj| tjdz dz SNg@)rrr%sqrtr*s r5rUz2TestSystematic.test_ndtr_complex..s"fkk1"RWWR[.1"4r7r/rrr)rr.rrr*rzs r5test_ndtr_complexz TestSystematic.test_ndtr_complexs2 GG 4 '&&1WUE5J K L  r7chttjtdt gdddy)NcRtjtj|SrO)rrrr*s r5rUz.TestSystematic.test_log_ndtr..svzz&++a.'Ar7iXrr?rGrrA)rr.log_ndtrrr rzs r5 test_log_ndtrzTestSystematic.test_log_ndtrs' KK A B UGs% r7c ttjtdt t ddt ddgdd y) Nctjtj| tjdz dz Sr)rrrr%rr*s r5rUz6TestSystematic.test_log_ndtr_complex..s+vzz&++qbn2Mb2P'Qr7rr/r/r=rr<rrGr)rr.rrrr*rzs r5test_log_ndtr_complexz$TestSystematic.test_log_ndtr_complex s: KK Q R '&$/75#3F G Hs  r7cVtdtjtddgdy)Nc2tj|dS)Nrz)r.eulerrs r5rUz.TestSystematic.test_eulernum..sbhhqk"or7r$r/r)rreulernumrrzs r5 test_eulernumzTestSystematic.test_eulernums$ % OO Au    r7c ttjtjt ddt dtjgddy)Nrr<r?r\) rr.rFrrDrr r%rVrzs r5 test_expintzTestSystematic.test_expints6 GG MM As^SBFF^ ,  r7cRd}t|tjtgy)Nc2tj|dSror.fresnelrs r5fresnelsz.TestSystematic.test_fresnels..fresnels%::a=# #r7)rrrr )r{rs r5 test_fresnelszTestSystematic.test_fresnels$ $Hfoow?r7cRd}t|tjtgy)Nc2tj|dSrrrs r5fresnelcz.TestSystematic.test_fresnelc..fresnelc*rr7)rrrr )r{rs r5 test_fresnelczTestSystematic.test_fresnelc)rr7czttjttjt gyrO)rr.gammarrr rzs r5 test_gammazTestSystematic.test_gamma.s BHH&6v||&DsugNr7c~ttjttjt gdyNrpr@)rr.rrrrrzs r5test_gamma_complexz!TestSystematic.test_gamma_complex1s' HH V\\ * \N  r7c rttjdtdddtddgddy)Nc2tj||dS)NTrrr!)r4rus r5rUz.TestSystematic.test_gammainc..=aTBr7r@F inclusive_arr)rr.r!r rzs r5 test_gammainczTestSystematic.test_gammainc9s1 KK B CU +SC[ 9  r7c rttjdtdddtddgddy)Nc2tj||dS)NT)rvrr)r4rvs r5rUz/TestSystematic.test_gammaincc..Grr7rrFr rr)rr. gammainccr rzs r5test_gammaincczTestSystematic.test_gammainccCs1 LL B CU +SC[ 9  r7cdd}ttjt|t gy)Nc@tj|jSrOrrrRr*s r5fz&TestSystematic.test_gammaln..fOs??1%** *r7)rr.gammalnrr )r{rs r5 test_gammalnzTestSystematic.test_gammalnMs# + BJJ(8(;ceWEr7)r(cttjttj t ddt t gyr)rr.eval_gegenbauerrr gegenbauerr rzs r5test_gegenbauerzTestSystematic.test_gegenbauerTs5    V.. / s^SUCE * r7c d}d}t|t|tddtddtgdddd t|t|tddtt t j d d d gddy)Nct|dkDrtjS|dk(rd}n%|dk(r d|z|z}ntj|||}t |dk(r|dkrt |t t |k(rctj||tjdz|}t|tjdkrtjd}t|d kDrtjS|S) Nrrrr$rrzz1e-50z0.0\4@Iw) rr%rrrrCrrrrVrGrvrHr2s r5rz6TestSystematic.test_gegenbauer_int..gegenbauer^s1v~vv AvaaCE%%aA.Qx1}RE!HE!H ,E%%aVZZ-@)@!Dq6FJJw// 5)A1v~vv Hr7ctjt|||}t|dkDrtj S|S)Nr)r.rrrr%rVrs r5 sc_gegenbauerz9TestSystematic.test_gegenbauer_int..sc_gegenbauerys3""3q61a0A1v~vv Hr7rr=gegeAi@Tr)rGrrrArr r)rrrr r r%r&)r{rrs r5test_gegenbauer_intz"TestSystematic.test_gegenbauer_int\s 6    Z ( As^Ss^SU 3d     Z ( As^SUHR[[b"-E$F GT  r7ctdttjt ddt t gy)NcVtjt||j|SrO)r.rrrRrGrvrHs r5rUz8TestSystematic.test_gegenbauer_complex..sB..s1vqvvqAr7rr=)rrrrrr rrzs r5test_gegenbauer_complexz&TestSystematic.test_gegenbauer_complexs/ A V.. / As^SUJL 1 r7ctdttjt ddt t gy)NcXtj|j|j|SrO)r.rrRr$s r5rUz@TestSystematic.test_gegenbauer_complex_general..sB..qvvqvvqAr7rwrx)rrrrr rrzs r5test_gegenbauer_complex_generalz.TestSystematic.test_gegenbauer_complex_generals/ A V.. / s^SUJL 1 r7cvttjtdt ddt gy)Nc8tj||fitSrO)rhankel1rrTrHs r5rUz-TestSystematic.test_hankel1..rr7@x@xD)rr.r+rr rzs r5 test_hankel1zTestSystematic.test_hankel1+ JJ I J  su % r7cvttjtdt ddt gy)Nc8tj||fitSrO)rhankel2rr,s r5rUz-TestSystematic.test_hankel2..rr7r-r.)rr.r3rr rzs r5 test_hankel2zTestSystematic.test_hankel2r0r7z%issues at intermediately large orderscvtdttjt ddt gy)Nc@tjt||SrO)r. eval_hermiterr!s r5rUz-TestSystematic.test_hermite..Q3r7rr/)rrrhermiterr rzs r5 test_hermitezTestSystematic.test_hermites* 3 V^^ , Au su % r7c tddttjfdt ddt ddgd y) Nrirhc2tj||fiSrO)rrQ)rvrHKWs r5rUz,TestSystematic.test_hyp0f1..sq!2r2r7ryrzrgj@rr)rrr.rQr )r{r=s @r5 test_hyp0f1zTestSystematic.test_hyp0f1s8 # - II 2 s^SC[ )  r7c tdtdtddtt ddt ddgy)NcBtj|j|SrOrP)rvr4s r5rUz4TestSystematic.test_hyp0f1_complex..s1661-r7c8tj||fitSrO)rrQrrvrHs r5rUz4TestSystematic.test_hyp0f1_complex..r%r7rrirM)rrr rr*rzs r5test_hyp0f1_complexz"TestSystematic.test_hyp0f1_complexs9 - H I b\:gdD&973;LM N r7c d}ttj|tddtdddtddgddy) Ncp tj|||S#t$rtjcYSwxYwrO)rhyp1f1ZeroDivisionErrorr%rVrs r5 mpmath_hyp1f1z1TestSystematic.test_hyp1f1..mpmath_hyp1f1s2 }}Q1--$ vv  s 55rir9r$Fr r)rGr)rr.rFr )r{rHs r5 test_hyp1f1zTestSystematic.test_hyp1f1s@   II  b\3q"%8#c2, G  r7c ttdtdtddtddt gdy)NcXtj|j|j|SrO)r.rFrRrs r5rUz4TestSystematic.test_hyp1f1_complex..sryy'Cr7c:tj|||fitSrO)rrFrrs r5rUz4TestSystematic.test_hyp1f1_complex..V]]1a-Ng-Nr7rwrxir)rrrr rrzs r5test_hyp1f1_complexz"TestSystematic.test_hyp1f1_complexs7 C D N O s^Ss^Z\ :  r7c tdtdtddtddtddtgdy)Ncntj|j|j|j|SrO)r.rrRrvrurrHs r5rUz4TestSystematic.test_hyp2f1_complex..s!ryyCr7c<tj||||fitSrO)rrrrQs r5rUz4TestSystematic.test_hyp2f1_complex.. aAq0TG0Tr7gYgY@rrrrzs r5test_hyp2f1_complexz"TestSystematic.test_hyp2f1_complexs;  C T U s^Ss^Ss^Z\ J  r7cttjtdt t t gy)Nc:tj|||fitSrO)rrtrrs r5rUz,TestSystematic.test_hyperu..rMr7)rr.rtrr rzs r5 test_hyperuzTestSystematic.test_hyperus* II N O UCE35 ! r7z:mpmath issue gh-342: unsupported operand mpz, long for powc bd}tt|tdddtddgddy) Nctj||tj| ztj|z SrO)rpowerr(rrBs r5 mp_igam_facz1TestSystematic.test_igam_fac..mp_igam_facs/<<1%fjj!n4V\\!_D Dr7rgļBFr rr\)rrr )r{r[s r5 test_igam_faczTestSystematic.test_igam_facs5 E    De ,c!Tl ;  r7cttjtjt ddgttjtjt ddgdyNrwrxrsrtrur@)rr.j0rr rzs r5test_j0zTestSystematic.test_j0s@ BEE699s4~.>?BEE699s4~.>TJr7cttjtjt ddgttjtjt ddgdyr_)rr.j1rr rzs r5test_j1zTestSystematic.test_j1s>BEE699s4~.>?BEE699s4~.>TJr7c ttjtdt t t t gtdtdt t t t gy)Nc<tj||||fitSrOrjacobirrQs r5rUz,TestSystematic.test_jacobi..rSr7cDtjt||||SrOr. eval_jacobir)rGrurrHs r5rUz,TestSystematic.test_jacobi..r~~c!faA>r7c<tj||||fitSrOrgrQs r5rUz,TestSystematic.test_jacobi..rSr7)rr.rkrr rrzs r5 test_jacobizTestSystematic.test_jacobisX NN T U UCE35#% (  > T U XsuceSU + r7c |dtdfdttttgddy)Nc>|dk(rytj||||S)Nrr)rrhrGrvrurHs r5rhz.TestSystematic.test_jacobi_int..jacobi$s!Av==Aq!, ,r7cDtjt||||SrOrjrqs r5rUz0TestSystematic.test_jacobi_int..*rlr7c6t||||fitSrO)rr)rGrvrurHrhs r5rUz0TestSystematic.test_jacobi_int..+s 7/71aNgNr7 Nr9rrrr )r{rhs @r5test_jacobi_intzTestSystematic.test_jacobi_int"s2 -  > N XsuceSU +  r7cZd}ttj|tddgdy)Ncj|dk(r t dz Sttjd|fitS)Nrr;)rrrkeirrs r5ryz$TestSystematic.test_kei..kei2s2Avs1u /#FJJ/1@@ @r7ꌠ9Y>)ꌠ9Y>)Frr)rr.ryr )r{rys r5test_keizTestSystematic.test_kei1s& A BFFC#eT*:);tDr7chttjtdt ddgdy)Nc8tjd|fitSro)rkerrrs r5rUz)TestSystematic.test_ker..<svzz!Q'B''Br7rzr{rr)rr.rrr rzs r5test_kerzTestSystematic.test_ker9s* FF B C     r7crtttjdt t gy)NcLttj||fitSrOrrlaguerrerr!s r5rUz.TestSystematic.test_laguerre..E:)&//:1aK7Kr7)rrr. eval_laguerrer rzs r5 test_laguerrezTestSystematic.test_laguerreAs& r'' ( K UCEN r7cJtddttgdy)Nc@tjt||SrO)r.rrr!s r5rUz2TestSystematic.test_laguerre_int..K))#a&!4r7cLttj||fitSrOrr!s r5rUz2TestSystematic.test_laguerre_int..Lrr7rtrrurzs r5test_laguerre_intz TestSystematic.test_laguerre_intIs 4 K Xsu   r7zsee gh-3551 for bad pointsc tddttj tjt ddgddy)NcTtj|t|jSrO)r.rOrrRrHrs r5rUz3TestSystematic.test_lambertw_real..TsQAFF 4r7cTtj|t|jSrO)rrOrrRrs r5rUz3TestSystematic.test_lambertw_real..UsCK8r7rrr?FrAr)rrr%rVrrzs r5test_lambertw_realz!TestSystematic.test_lambertw_realQs4 4 8  (&B- 8u  r7c d}tjddfd}t|tjt d|dgd y) NgGase@r$gE@ctjd5|zdz z |dz z}|tjk7r|t|z}n'|zdz z d|dz zz}|t|z}||z}ddd|S#1swYSxYw)Nr)overrL)r%rrVr)rHfacrXegs r5rz:TestSystematic.test_lanczos_sum_expg_scaled..gamma_s(+ A Q!c'2"&&=6q99CECK?c1s7m.wrr7cLttj||fitSrOrrrrr!s r5rUz2TestSystematic.test_legendre_int..xrr7rtrc@tjt||SrOrr!s r5rUz2TestSystematic.test_legendre_int..rr7cLttj||fitSrOrr!s r5rUz2TestSystematic.test_legendre_int..rr7rr rg)rrr r r%r&rzs r5test_legendre_intz TestSystematic.test_legendre_intusK 4 K Xsu     4 K Xx CR 89 : r7c d}d}d}t||tddtddtgt||tddtddtddgd y) Ncf t5}|jttj|||dd}dddtdkDr0t jt j|jz}|S#1swYIxYw#t $rt jcYSwxYw)Ncategoryrrzrz)#v) rfilterDeprecationWarningr.lpmn ValueErrorr%rrrVrrR)rGr?r4suprTs r5lpnmz(TestSystematic.test_legenp..lpnms &(3CJJ(:J;1a(+E2A3 1v~FFRWWQVV_,H33 vv  s( B4BBB BB0/B0ctj|||}t|dkDr0tjtj |j z}|S)Nr)r.rrr%rVrrR)rGr?r4rTs r5lpnm_2z*TestSystematic.test_legenp..lpnm_2s>1a A1v~FFRWWQVV_,Hr7c|dk(s|dk(rHt||k(r:|dk(r4|dkr| dz }tjtj||Syt |dkrt j St |dkrdnd}ttj||||}t |dkDr0tjtj|jz}|S) Nr$rzrrorrntyper) rrrZrrr%rrrrVrR)rGr?r4typrTs r5rz*TestSystematic.test_legenp..legenpsQ!r's1v{61uBF!<< A::1v~vv 1v{!C/ /1acBA1v~JJQVV!44Hr7r/r=rzr$rrru)r{rrrs r5 test_legenpzTestSystematic.test_legenpsf   0 D&6$+OQTQV*WX   D# D#B ;  r7c d}d}tjgd}tjgd}|dddfd|dddfzzj}t||t gdt gdt |gdd y) Nc t5}|jttj|j |j |dddcdddS#1swYyxYw#t $rtjcYSwxYw)Nrrrrr rrrr.clpmnrRrr%rrGr?r4rs r5clpnmz3TestSystematic.test_legenp_complex_2..clpnmt &(ICJJ(:J;88AFFAFFAA>qA%HIII vv  / A+A A A+A($A+(A++BBct|dkrtjSttj t |jt |j|dSNrorrrr%rrrrrrRrGr?r4s r5rz4TestSystematic.test_legenp_complex_2..legenpD1v~vv 2#FMM23qvv;AFF QUVW Wr7 r|rrKrrurLrrgg@@rwrKrLg?r!r|rzrr$rrrrrr%r,rrr r{rrrHrWr4s r5test_legenp_complex_2z$TestSystematic.test_legenp_complex_2  X HHC D HH+ , qvYAd1fI % , , .   + , + , a[  r7c d}d}tjgd}tjgd}|dddfd|dddfzzj}t||t gdt gdt |gdd y) Nc t5}|jttj|j |j |dddcdddS#1swYyxYw#t $rtjcYSwxYw)Nrrnrrrrrs r5rz3TestSystematic.test_legenp_complex_3..clpnmrrct|dkrtjSttj t |jt |j|dS)Nrornrrrs r5rz4TestSystematic.test_legenp_complex_3..legenprr7rrr!rrrrrrs r5test_legenp_complex_3z$TestSystematic.test_legenp_complex_3rr7z*apparently picks wrong function at |z| > 1c hd}d}t||tddtddtgy)Nc<tj|||ddSNrr)r.lqmnrs r5lqnmz(TestSystematic.test_legenq..lqnms771a#A&u- -r7ct|dkrtjSttj |||dSr)rr%rrrlegenqrs r5rz*TestSystematic.test_legenq..legenqs31v~vv 2#FMM21aC Cr7rr=rur{rrs r5 test_legenqzTestSystematic.test_legenqs5 . D    As^VAs^SU 3 r7c ld}d}t||tddtddtgdy)Nctjt|jt|j|ddSr)r.rrrRrs r5rz0TestSystematic.test_legenq_complex..lqnms/773qvv;AFF Q7:5A Ar7ct|dkrtjSttj t |jt |j|dSr)rr%rrrrrrRrs r5rz2TestSystematic.test_legenq_complex..legenq rr7rr=r)rrrrs r5test_legenq_complexz"TestSystematic.test_legenq_complexs9 B X    As^VAs^Z\ :  r7cLd}d}tt|tgdd|y)Nchtjtj||k(|dkzddS)NrFT)r%r`floorrs r5raz0TestSystematic.test_lgam1p..param_filters+88RXXa[A-!q&95$G Gr7cFtjd|zjSrrr*s r5 mp_lgam1pz-TestSystematic.test_lgam1p..mp_lgam1ps??1q5).. .r7r?r=rb)rrr )r{rars r5 test_lgam1pzTestSystematic.test_lgam1ps- H /    UG%  r7cZd}ttj|tgdddy)Nc tj|}|S#t$r,ttj tj }Y|SwxYwrO)rrrr*r%r)r4rXs r5mpmath_loggammaz5TestSystematic.test_loggamma..mpmath_loggamma+sF .ooa(J .bffbff-J .s1A AFr)rdistinguish_nan_and_infrA)rr.rr)r{rs r5 test_loggammazTestSystematic.test_loggamma*s+   KK  \N$)  r7c\d}t|tdttgy)Nc4tj||dSro)r.pbdvr,s r5pcfdz&TestSystematic.test_pcfd..pcfd=771a=# #r7c8tj||fitSrO)rrrr,s r5rUz*TestSystematic.test_pcfd..As&++a*Fg*Fr7)rrr )r{rs r5 test_pcfdzTestSystematic.test_pcfd;s& $  F G UCEN r7zHit's not the same as the mpmath function --- maybe different definition?cNd}t|dttgdy)Nc4tj||dSro)r.pbvvr,s r5pcfvz&TestSystematic.test_pcfv..pcfvHrr7chtttj||fitSrO)rrrrrr,s r5rUz*TestSystematic.test_pcfv..Ls(F(8(EFq!WwWr7rrr)r{rs r5 test_pcfvzTestSystematic.test_pcfvEs# $  W UCEN  r7c d}d}d}t|tjtddtddgddt||tddtddgd dy) Nc4tj||dSror.pbwarBs r5pcfwz&TestSystematic.test_pcfw..pcfwRrr7c4tj||dSrrrBs r5dpcfwz'TestSystematic.test_pcfw..dpcfwUrr7cPtjtj||fdS)Nr>)rdiffrrBs r5 mpmath_dpcfwz.TestSystematic.test_pcfw..mpmath_dpcfwXs;;v{{QFF; ;r7rerfg:0yU>r=rg& .!>)rrrr )r{rrrs r5 test_pcfwzTestSystematic.test_pcfwQsi $ $ <   KK QZR $      QZR $  r7zCissues at large arguments (atol OK, rtol not) and At_ce $ r7cttjtjt dt j gdddy)NirFT)rGrr)rr.r rr r%rVrzs r5 test_rgammazTestSystematic.test_rgammaws2 II MM     r7c~ttjttjt gdyr)rr.r rrrrzs r5test_rgamma_complexz"TestSystematic.test_rgamma_complexs' II V]] + \N  r7zNsee gh-3551 for bad points on 32 bit systems and gh-8095 for another bad point)r)ctjtjtjdk\rtj }nd}t tj|ttgdy)Nrxct||zt||zk(r7t||zdkr&tj|}t||z|z }tj||Sro)rCrrrrrf)rvr?s r5mppochz&TestSystematic.test_rf..mppochsYQ<3q1u:-%A,!2C 1 AAE QAyyA&r7rr) rparserrVersionr rr.pochr )r{r s r5test_rfzTestSystematic.test_rfsN ==++ ,0H HYYF ' BGGVceSU^Er7ctjtj}t t t jtgdd|zyrU) r%r0rCr1rrrr2r rVs r5 test_sinpizTestSystematic.test_sinpis8hhuo!!  LL UG3  r7cZtttjt gddy)NFg+=r)rrrr2rrzs r5test_sinpi_complexz!TestSystematic.test_sinpi_complexrZr7cd}t|tjtgt|tjt gdgy)Nc2tj|dSror<rs r5shiz$TestSystematic.test_shi..shir?r7r@)rrrr r r{rs r5test_shizTestSystematic.test_shirDr7c d}t|tjtt t j dt t j dgdy)Nc2tj|dSror<r*s r5rz,TestSystematic.test_shi_complex..shir?r7rsrtr^r@)rrrrr*r%rVrs r5test_shi_complexzTestSystematic.test_shi_complexrHr7cRd}t|tjtgy)Nc2tj|dSrorKrs r5siz"TestSystematic.test_si..sirNr7)rrrr r{rs r5test_sizTestSystematic.test_sis !B CE73r7c d}t|tjtt dt j t dt j gdy)Nc2tj|dSrorKr*s r5rz*TestSystematic.test_si_complex..sirNr7rsrtr^r@)rrrrr*r%rVr s r5test_si_complexzTestSystematic.test_si_complexsC !   II rvvg.RVV0D E F  r7cd}ttjt|t dt j gdy)Nc4tjdd|z Sr(rr)rs r5dilogz)TestSystematic.test_spence..dilog>>!QU+ +r7rrr@)rr.r+rr r%rVr{r(s r5 test_spencezTestSystematic.test_spences3 ,  II U # BFF^   r7chd}ttjt|t gdy)Nc4tjdd|z Sr(r'r*s r5r(z1TestSystematic.test_spence_complex..dilogr)r7rr@)rr.r+rrr*s r5test_spence_complexz"TestSystematic.test_spence_complexs( , II U # \N  r7c d}t|tjtddtddt dt t ddt zgddd y) Nc||kDrtjSt5}|jtt j ||||cdddS#1swYyxYw)Nr)r%rrrrr.sph_harm)lr?rrrs r5 spherharmz0TestSystematic.test_spherharm..spherharmsP1uvv "$ 5 $6 7{{1ae4 5 5 5s .AA!rr=rrrTipr[)rrrGr)rrr3rr r)r{r3s r5test_spherharmzTestSystematic.test_spherharmsO 5      As^VAs^S1^S1"=M N  r7c ttjttj t ddt ddgdy)Nrr& .>r@)rr.struverrstruvehr rzs r5 test_struvehzTestSystematic.test_struvehs4 II V^^ , s^SC[ )  r7c d}ttjt|t ddt ddgddy)NcJ|dkro|| krit|dkDr[tjj} dtj_tj|||tj_Stj||S#|tj_wxYw)Nrrr)rrrrstruvel)rTr4rs r5 mp_struvelz/TestSystematic.test_struvel..mp_struvelsq1uaRCFTM ))--,$'FIIM!>>!Q/$+FIIM>>!Q' '%,FIIMs *B B"r6rrr7Tr)rr. modstruverr )r{r>s r5 test_struvelzTestSystematic.test_struvels: (  LL Z ( s^SC[ )  r7c^d}ttj|tddgdddy)Ncztjtj|tjdS)Nz-0.5)rrOr(rrrs r5mpmath_wrightomega_realzETestSystematic.test_wrightomega_real..mpmath_wrightomega_reals$??6::a=&**V2DE Er7r}gPKDg+.&s)!R0r7rFr)rr.rYrrzs r5test_wrightomegazTestSystematic.test_wrightomega#s! NN 0 \N  r7c ttjttjt dddt ddgy)Nr$ _BF)rvrur rrvr )rr.zetarrr rzs r5test_hurwitz_zetaz TestSystematic.test_hurwitz_zeta,s5 GG V[[ ) 1% 0#u2M N r7cXttjdtddgddy)NcV|dk7rtj|StjSrrrKrVrs r5rUz2TestSystematic.test_riemann_zeta..6sQfkk!nFJJr7r/r=Frpr)rr.rKr rzs r5test_riemann_zetaz TestSystematic.test_riemann_zeta3s& GG > s^   r7cZttjdtddgdddy)Nc\|dk7rtj|dz StjSrrOrs r5rUz+TestSystematic.test_zetac..?s!AFfkk!nq( r7r/r=F-rp)rrrA)rr.zetacr rzs r5 test_zetaczTestSystematic.test_zetac<s) HH B s^   r7cd}ttjt|t ddt gdddy) Nc tjj|}tjj|}|dk(rtjj|Stjj |||z Srorrrrrpowm1)rHlmbdas r5 mp_boxcoxz-TestSystematic.test_boxcox..mp_boxcoxHsZ a AIIMM%(Ezyy}}Q''yyq%0588r7rFrJr<rr?r)rr.boxcoxrr )r{r[s r5 test_boxcoxzTestSystematic.test_boxcoxFs: 9  II Y ' 1% (#% 0  r7cd}ttjt|t ddt gdddy) NcVtjj|}tjj|}tjjd}|dk(r"tjj||zStjj ||z||z SrrX)rHrZones r5 mp_boxcox1pz1TestSystematic.test_boxcox1p..mp_boxcox1p[st a AIIMM%(E))--"Czyy}}S1W--yysQw6>>r7rzFrJr<rr?r)rr.boxcox1prr )r{ras r5 test_boxcox1pzTestSystematic.test_boxcox1pYs: ?  KK [ ) 25 )35 1  r7c pd}tdt|tddtddgdddf y) Nctj|}tj|tjddz z|tjd|ztj z z }|j dk(r |jS|SNr$rrr mpmathifyrrrrrrNrRrGr4argouts r5mp_spherical_jnz9TestSystematic.test_spherical_jn..mp_spherical_jnni""1%C>>!fjjmAo"5s;;;quVYY/0Cxx1}xx r7c@tjt||SrO)r. spherical_jnrrGr4s r5rUz2TestSystematic.test_spherical_jn..xr8r7rr<rsrtrc2tj|dkDS)Ng#B ;)r%rr*s r5rUz2TestSystematic.test_spherical_jn..}s"&&)e*;r7)rrarr{rls r5test_spherical_jnz TestSystematic.test_spherical_jnms<   3 _ - As^Ss^ , ;<  r7c`d}tdt|tddtgy)Nctj|}tj|tjddz z|tjd|ztj z z }|j dk(r |jS|Srfrgris r5rlzATestSystematic.test_spherical_jn_complex..mp_spherical_jnrmr7cTtjt|j|SrO)r.rorrRrps r5rUz:TestSystematic.test_spherical_jn_complex..QVVa8r7rr<rrrrrrs r5test_spherical_jn_complexz(TestSystematic.test_spherical_jn_complex,   8 _ - As^Z\ * r7c hd}tdt|tddtddgdy) Nctj|}tj|tjddz z|tjd|ztj z z }|j dk(r |jS|SrfrrhrrrrrrNrRris r5mp_spherical_ynz9TestSystematic.test_spherical_yn..mp_spherical_ynrmr7c@tjt||SrO)r. spherical_ynrrps r5rUz2TestSystematic.test_spherical_yn..r8r7rr<g _rIr=rrr{r~s r5test_spherical_ynz TestSystematic.test_spherical_yns4   3 _ - As^S- .  r7c`d}tdt|tddtgy)Nctj|}tj|tjddz z|tjd|ztj z z }|j dk(r |jS|Srfr}ris r5r~zATestSystematic.test_spherical_yn_complex..mp_spherical_ynrmr7cTtjt|j|SrO)r.rrrRrps r5rUz:TestSystematic.test_spherical_yn_complex..rwr7rr<rxrs r5test_spherical_yn_complexz(TestSystematic.test_spherical_yn_complexrzr7cfd}tdt|tddtgddy)Nctj|}tj|tjddz z|tjd|ztj z z }|j dk(r |jS|SrfrrhrrrrrrNrRris r5mp_spherical_inz9TestSystematic.test_spherical_in..mp_spherical_inrmr7c@tjt||SrO)r. spherical_inrrps r5rUz2TestSystematic.test_spherical_in..r8r7rr<g訰6rrr{rs r5test_spherical_inz TestSystematic.test_spherical_ins2   3 _ - As^SU #  r7c`d}tdt|tddtgy)Nctj|}tj|tjddz z|tjd|ztj z z }|j dk(r |jS|Srfrris r5rzATestSystematic.test_spherical_in_complex..mp_spherical_inrmr7cTtjt|j|SrO)r.rrrRrps r5rUz:TestSystematic.test_spherical_in_complex..rwr7rr<rxrs r5test_spherical_in_complexz(TestSystematic.test_spherical_in_complexrzr7cdd}tdt|tddtgdy)Nc>tj|}tj|tjddz z|tjd|ztj z z }tj|j dk(r |jS|SrfrrhrrrrrrNrRris r5mp_spherical_knz9TestSystematic.test_spherical_kn..mp_spherical_knsw""1%C>>!fjjmAo"5s;;;quVYY/0C"''1,xx r7c@tjt||SrO)r. spherical_knrrps r5rUz2TestSystematic.test_spherical_kn..r8r7rr[r=rrr{rs r5test_spherical_knz TestSystematic.test_spherical_kns/   3 _ - As^SU #  r7z.Accuracy issues near z = -1 inherited from kv.cdd}tdt|tddtgdy)Nctj|}tj|tjddz z|tjd|ztj z z }|j dk(r |jS|Srfrris r5rzATestSystematic.test_spherical_kn_complex..mp_spherical_knrmr7cTtjt|j|SrO)r.rrrRrps r5rUz:TestSystematic.test_spherical_kn_complex..rwr7rr<rrxrs r5test_spherical_kn_complexz(TestSystematic.test_spherical_kn_complexs/   8 _ - As^Z\ *  r7N)__name__ __module__ __qualname__r|rrrrrrrrrrrrrrrrrrrrrrrrr&pytestmarkxfailr0r6r9rCrGrPrSrWrYr]rcrgrlrwr{rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrr!r%rr(r/r4r:r>rCrIrNrTrWxfail_on_32bitr]rardrnrvr|rrrrrrrrrrrrrrrrrrrrrrrrrr!r$r+r.r4r:r@rDrGrLrPrUr]rcrsryrrrrrrrr7r5rlrlsn., ., ., ., . . 0    "     "    ! F     B  [[5)RS T   [[5)RS T U  =  U      0)    E DWIRI    $  FT  BI      @ @ O   F [[5! " 0 d [[5! "      [[5)PQ R       [[5! "    [[5! "  [[!HI  I  KK  [[5!  "    E     [[ <= >  .OO  3 j < < [[5)UV W   " $ " [[5! "  [[5*GH H  8 [[567 7    [[ ')F)F   U  4        (      & ( &  "  $  " [[5NP P r7rl)K__doc__numpyr% numpy.testingrrrrrr scipy._libr scipy.specialspecialr.scipy.special._testutilsrr r r scipy.special._mptestutilsr r rrrrrrrrscipy.special._ufuncsrrrrrrr ImportErrorr6rIrYrcrwrrrrrslowrrrrrrrr rrrr%r-r4r7rJrQr_rbrergrrrlrr7r5rswEE %vv--vv > > vv!!(vv66vwO O,vwC C"vvGG>vvCC*vv//$vvEE8vv::*vv0K0Knvv::Lvv = = vv = =&vv;;.vv<<*vv<<&vv < <(vv B B&vv ; ;&vv 8 8vv 8 8$vv990vv??*vv @ @vv @ @"vv==. sS )vvE E E k% 8 $F%s M MM