+
    0ii8                        ^ RI t ^ RIt^ RIt^ RIHt ^ RIt^ RIHt ^ RI	t	^ RI
Ht  ^ RIt ! R R4      t ! R R4      t ! R	 R
4      t ! R R4      tR t ! R R4      tR tR tR tR tR t ^ RItR]! ]4      9   t ! R R]4      tR]P<                  R3R ltR t R t!RR lt"R#   ] d     Li ; i  ] d    Rt LBi ; i)     N)zip_longest)assert_)assert_func_equalc                   l   a  ] tR t^t o Rt]P                  ) ]P                  RR3R ltR tR t	Rt
V tR# )ArgzzGenerate a set of numbers on the real axis, concentrating on
'interesting' regions and covering all orders of magnitude.

Tc                b   W8  d   \        R 4      hV\        P                  ) 8X  d,   R\        P                  ! \        4      P
                  ,          pV\        P                  8X  d,   R\        P                  ! \        4      P
                  ,          pWuV n        V n        W4uV n        V n	        R# )z#a should be less than or equal to b      ?Ng      )

ValueErrornpinffinfofloatmaxabinclusive_ainclusive_b)selfr   r   r   r   s   &&&&&X/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/special/_mptestutils.py__init__Arg.__init__   sx    5BCC<RXXe_(((A;BHHUO'''A-8*$*    c                   V^ 8  d   \        R4      hV^,          ^ 8X  d   V^,          pTpMV^,          pV^,           pV^
8  dC   \        P                  ! \        P                  ! V4      \        P                  ! V4      V4      pEMV^ 8  d!   V^
8  d   \        P                  ! WV4      pEMV^ 8  d`   \        P                  ! V^
VRR7      p\        P                  ! ^\        P                  ! V4      V4      p\        P
                  ! Wx34      pEM[V^ 8X  d   V^
8:  dz   \        P                  ! ^ W%4      pVP                  ^8  d   \        P                  ! V^,          4      p	MRp	\        P                  ! RWRR7      p\        P
                  ! W34      pMV^,          ^ 8X  d   V^,          p
T
pMV^,          p
V
^,           p\        P                  ! ^ ^
VRR7      pVP                  ^8  d   \        P                  ! V^,          4      p	MRp	\        P                  ! RWRR7      p\        P                  ! ^\        P                  ! V4      V4      p\        P
                  ! WV34      p\        P                  ! V4      # )r   za should be positiveF)endpointi)r
   r   logspacelog10linspacehstacksizesort)r   r   r   nnlogptsnlinptsptslinptslogptsrightnlogpts1nlogpts2logpts1logpts2s   &&&&          r   _positive_valuesArg._positive_values'   s   q5344 q5A:dGGdGkG7++bhhqk288A;:CUq2v++aA&CU [[B%@F[[BHHQK9F))V,-C!VR [[A/F{{Q+[[euEF))V,-C
 {a"A:#"A:#a<[[B%@F{{Q+kk#uGGkk!RXXa[(;G))Wg67Cwws|r   c                   V P                   V P                  r2W#8X  d   \        P                  ! V4      # V P                  '       g
   V^,          pV P
                  '       g
   V^,          pV^,          ^ 8X  d   V^,          pTpMV^,          pV^,           pV^ 8  d   V P                  W#V4      p. pMWV^ 8:  d   . pV P                  V) V) V4      ) pM7V P                  ^ W44      pV P                  ^ V) V^,           4      ) pVR,          p\        P                  ! VRRR1,          V34      pV P                  '       g
   VR,          pV P
                  '       g   VRR pV# )z%Return an array containing n numbers.:   NNN)r   r   r   zerosr   r   r,   r   )	r   r!   r   r   n1n2posptsnegptsr$   s	   &&       r   values
Arg.values_   sB   vvtvv1688A;FAFAq5A:ABBABaB6**13FF!VF++QBA66F**1a4F++Ar26::FBZFii"v./b'Ccr(C
r   )r   r   r   r   N)__name__
__module____qualname____firstlineno____doc__r   r   r   r,   r6   __static_attributes____classdictcell____classdict__s   @r   r   r      s5     
 &&BFF$ 	F6p# #r   r   c                   ,   a  ] tR t^t o R tR tRtV tR# )FixedArgc                <    \         P                  ! V4      V n        R # N)r   asarray_values)r   r6   s   &&r   r   FixedArg.__init__   s    zz&)r   c                    V P                   # rD   rF   )r   r!   s   &&r   r6   FixedArg.values   s    ||r   rI   Nr8   r9   r:   r;   r   r6   r=   r>   r?   s   @r   rB   rB      s     * r   rB   c                      a  ] tR t^t o ]! ]P                  ) ]P                  ) 4      ]! ]P                  ]P                  4      3R ltR tRt	V t
R# )
ComplexArgc                    \        VP                  VP                  4      V n        \        VP                  VP                  4      V n        R # rD   )r   realimagr   r   r   s   &&&r   r   ComplexArg.__init__   s.    '	'	r   c                :   \        \        P                  ! \        P                  ! V4      4      4      pV P                  P                  V4      pV P                  P                  V^,           4      pVR,          RVR,          ,          ,           P                  4       # )r/   y              ?)NNNN)NrT   )intr   floorsqrtrO   r6   rP   ravel)r   r!   mxys   &&   r   r6   ComplexArg.values   si    $%IIQIIQU#&	BqyL(//11r   )rP   rO   N)r8   r9   r:   r;   complexr   r   r   r6   r=   r>   r?   s   @r   rM   rM      s;      "&&266'2gbffbff6M (2 2r   rM   c                   0   a  ] tR t^t o RR ltR tRtV tR# )IntArgc                    Wn         W n        R # rD   r   r   rQ   s   &&&r   r   IntArg.__init__   s    r   c                   \        V P                  V P                  4      P                  \	        ^V^,          ,           V^,
          4      4      P                  \        4      p\        P                  ! R^4      p\        P                  ! \        P                  W#3,          4      pWDV P                  8  W@P                  8  ,          ,          pV# )r/   )r   r   r   r6   r   astyperU   r   arangeuniquer_)r   r!   v1v2vs   &&   r   r6   IntArg.values   s     ''A1Hac(:;BB3GYYr1IIbeeBFm$DFF{q66z*+r   ra   N)ii  rK   r?   s   @r   r_   r_      s      r   r_   c           	      x   \        V \        P                  4      '       d   V P                  4       pV# \	        V 4      p\        P
                  ! V  Uu. uF  p\        V\        4      '       d   R MRNK  	  up4      pW\        V4      ,          ,          P                  \        4      ^,           p\        W4       UUu. uF  w  rFVP                  V4      NK  	  ppp\        P                  ! \        P                  ! \        P                  ! V!  !  4      P                  VR4      P                   pV# u upi u uppi )g      ?g      ?r0   )
isinstancer   ndarraycopylenrE   rM   sumre   rU   zipr6   arraybroadcast_arraysix_reshapeT)argspecr!   argsnargsspecmsrY   s   &&     r   get_argsr~      s    '2::&&||~ K GZZFMNgdJtZ00Sc9gN
 SW*o%%c*Q..1'.>?.>74A.>?xx++RVVT];<DDUBOQQK O @s   #D1<D6c                   6   a  ] tR t^t o RR ltR tR tRtV tR# )
MpmathDataNc           	        Vf7    \        \        P                  P                  RR4      4      pV'       d   RMRpWn        W n        W0n        WPn        W`n	        Wpn
        Wn        Wn        Wn        Wn        \        V P                  \         P"                  4      '       d@   \         P$                  ! V P                  P&                  \         P(                  4      V n        M8\-        V P                   Uu. uF  p\        V\.        4      NK  	  up4      V n        Wn        Wn        V'       d   VR8X  d   \3        VRR 4      pV'       d   VR8X  d   \3        VRR 4      pW@n        Wn        R #   \         d    Rp ELKi ; iu upi )NSCIPY_XSLOW0Fi  i  z<lambda>r8   )rU   osenvirongetr
   
scipy_funcmpmath_funcarg_specdpsprecr!   rtolatolignore_inf_signnan_okrn   r   ro   
issubdtypedtypecomplexfloating
is_complexanyrM   distinguish_nan_and_infgetattrnameparam_filter)r   r   r   r   r   r   r   r!   r   r   r   r   r   r   is_xslowargs   &&&&&&&&&&&&&&  r   r   MpmathData.__init__   s*    9!rzz~~mSAB !cA$& 			.dmmRZZ00 mmDMM,?,?ASASTDO!8<FC,FDO  /'>$tz):z48Dtz);
D9D	(9  ! !& Gs   )E* 3E>*E;:E;c                  a a
a \         P                  P                  R 4       \        S P                  S P
                  4      p\        P                  P                  \        P                  P                  r2 S P                  e   S P                  .pM^.pS P                  e    S P                  \        P                  n	        \         P                  ! VP                  \         P                  4      '       d   \        oR o
MR o
R o\        V4       F|  w  rVV\        P                  n         \        S P                   V
VV 3R lVRS P"                  S P$                  S P&                  S P(                  S P*                  S P,                  R7
        M	  W#u\        P                  n        \        P                  n	        R#   \.         dX    T\1        T4      ^,
          8  d<   \2        P4                  ! 4       w  rxp	TP6                  T	Jd   TP9                  T	4      hTh EK  i ; i  Y#u\        P                  n        \        P                  n	        i ; i)i  Nc                 @    \         P                  ! \        V 4      4      # rD   )mpmathmpcr]   rZ   s   &r   mptype MpmathData.check.<locals>.mptype   s    !::gaj11r   c                 @    \         P                  ! \        V 4      4      # rD   )r   mpfr   r   s   &r   r   r      s    !::eAh//r   c                     \        V P                  4      R ^\        V P                  4      ,           ,          8  d   \        P                  # \        V P                  4      # )gؗҜ<)absrP   rO   r   nan	mpf2floatr   s   &r   pytype MpmathData.check.<locals>.pytype   s;    166{UAAFFO%<<!vv(00r   c                  D   < S! SP                   ! \        SV 4      !  4      # rD   )r   map)r   r   r   r   s   *r   <lambda>"MpmathData.check.<locals>.<lambda>	  s    6$*:*:CN*K#Lr   F)
vectorizedr   r   r   r   r   r   )r   randomseedr~   r   r!   r   mpr   r   r   r   r   mpc2complex	enumerater   r   r   r   r   r   r   r   AssertionErrorrq   sysexc_info__traceback__with_traceback)r   argarrold_dpsold_precdps_listjr   tpvaluetbr   r   s   f         @@r   checkMpmathData.check   s   
		t $--0 #IIMM699>>4	>xx# HH:4yy$!%		
 }}V\\2+=+=>>$201 $H- #		$%L#(!YY!YY(,(<(<040L0L#{{%)%6%6 ! .2 -4)FIIM699> & $CM!O+(+2 ..b8"'"6"6r"::# ,$ -4)FIIM699>s9   7B H$ 85H$ .A!F?H$ ?AH!H$  H!!H$ $,Ic                f    V P                   '       d   R V P                   R2# R V P                   R2# )z<MpmathData: z (complex)>>)r   r   )r   s   &r   __repr__MpmathData.__repr__  s1    ???"499+[99"499+Q//r   )r   r   r   r   r   r   r   r!   r   r   r   r   r   r   )
NNNNgHz>gYnFTTN)	r8   r9   r:   r;   r   r   r   r=   r>   r?   s   @r   r   r      s     ')R<>|0 0r   r   c                  <    \        V / VB pVP                  4        R # rD   )r   r   )r   kwds   *, r   assert_mpmath_equalr   %  s    AAGGIr   c                 N    \         P                  P                  R R7      ! V 4      # )z8    Test not yet functional (too slow), needs more work.)reason)pytestmarkskip)funcs   &r   nonfunctional_tooslowr   *  s)    ;;I  
 r   c           	     H    \        \        P                  ! V ^^ ^ R7      4      # )z
Convert an mpf to the nearest floating point number. Just using
float directly doesn't work because of results like this:

with mp.workdps(50):
    float(mpf("0.99999999999999999")) = 0.9999999999999999

	min_fixed	max_fixed)r   r   nstrr   s   &r   r   r   4  s     Qa1=>>r   c                 f    \        \        V P                  4      \        V P                  4      4      # rD   )r]   r   rO   rP   r   s   &r   r   r   @  s!    9QVV$i&788r   c                    a a R  oV V3R lpV# )c                 n    \        V \        P                  4      '       d   \        V 4      # \	        V 4      # rD   )rn   r   r   r]   r   r   s   &r   tofloattrace_args.<locals>.tofloatE  s&    a$$1:8Or   c                    < \         P                  P                  \        \	        SV 4      4      : R 24       \         P                  P                  4         S! V / VB p\         P                  P                  RV: 24       \         P                  P                  R4       \         P                  P                  4        V#   \         P                  P                  R4       \         P                  P                  4        i ; i): z-> 
)r   stderrwritetupler   flush)r   r   rr   r   s   *, r   wraptrace_args.<locals>.wrapK  s    

E#gq/25R89

	a2AJJs1%[)JJT"JJ JJT"JJs   +C ?D  )r   r   r   s   f @r   
trace_argsr   D  s    	 Kr   	setitimerFc                       ] tR tRtRtR# )TimeoutErrori_  r   N)r8   r9   r:   r;   r=   r   r   r   r   r   _  s    r   r   r	   Tc                \   a aa \         '       d   V'       d   R oVVV 3R lpV# VV 3R lpV# )a  
Decorator for setting a timeout for pure-Python functions.

If the function does not return within `timeout` seconds, the
value `return_val` is returned instead.

On POSIX this uses SIGALRM by default. On non-POSIX, settrace is
used. Do not use this with threads: the SIGALRM implementation
does probably not work well. The settrace implementation only
traces the current thread.

The settrace implementation slows down execution speed. Slowdown
by a factor around 10 is probably typical.
c                     \        4       hrD   )r   )signumframes   &&r   sigalrm_handler%time_limited.<locals>.sigalrm_handlers  s
    . r   c                    <a  V VVV3R  lpV# )c                    < \         P                   ! \         P                  S4      p\         P                  ! \         P                  S4        S! V / VB \         P                  ! \         P                  ^ 4       \         P                   ! \         P                  V4       #   \         dP    Su \         P                  ! \         P                  ^ 4       \         P                   ! \         P                  T4       # i ; i  \         P                  ! \         P                  ^ 4       \         P                   ! \         P                  T4       i ; i)r   )signalSIGALRMr   ITIMER_REALr   )r   r   old_handlerr   
return_valr   timeouts   *, r   r   (time_limited.<locals>.deco.<locals>.wrapw  s    $mmFNNOL  !3!3W=?>b> $$V%7%7;MM&..+>	 $ &%%$$V%7%7;MM&..+>	& $$V%7%7;MM&..+>s%   B C9,C< 8C99C< <AEr   )r   r   r   r   r   s   f r   decotime_limited.<locals>.decov  s    	? 	? Kr   c                    <a  V VV3R  lpV# )c                  `  <aa \         P                   ! 4       oVVV3R  lo\        P                  ! S4        S! V / VB \        P                  ! R4       #   \         d2    \        P                  ! R4       Su \        P                  ! R4       # i ; i  \        P                  ! R4       i ; i)c                 ^   < \         P                   ! 4       S,
          S8  d   \        4       hS# rD   )timer   )r   eventr   
start_timer   traces   &&&r   r  7time_limited.<locals>.deco.<locals>.wrap.<locals>.trace  s#    yy{Z/'9*n, Lr   N)r   r   settracer   )r   r   r  r  r   r   r   s   *,@@r   r   r     s}    !YY[
! U#'>b>
 LL&	 $ &LL&%%LL&	& LL&s#   A #B9B BB B-r   )r   r   r   r   s   f r   r   r     s    ' Kr   )POSIX)r   r   use_sigalrmr   r   s   ff& @r   time_limitedr  c  s)     u	!	< K#	" Kr   c                   a  V 3R lpV# )z9Decorate function to return nan if it raises an exceptionc                  X   <  S! V / VB #   \          d    \        P                  u # i ; irD   )	Exceptionr   r   )r   r   r   s   *,r   r   exception_to_nan.<locals>.wrap  s.    	>b>! 	66M	s    ))r   r   r   s   f r   exception_to_nanr    s    
 Kr   c                   a  V 3R lpV# )z1Decorate function to return nan if it returns infc                  p   < S! V / VB p\         P                  ! V4      '       g   \         P                  # V# rD   )r   isfiniter   )r   r   rk   r   s   *, r   r   inf_to_nan.<locals>.wrap  s+    !NrN{{1~~66Mr   r   r  s   f r   
inf_to_nanr    s    
 Kr   c                P   . p\        \        W4      4       Fr  w  pw  rgVe   Vf   \        R4      h\        P                  ! Wg,
          4      W#\        P                  ! V4      ,          ,           8  g   K_  VP                  WVV34       Kt  	  \        V4      pV^ 8  Ed   \        \        \        P                  ! V4      4      4      p	R.p
V
P                  RV RX^,            R24       V F  w  rVp\        P                  ! Wi^ ^ R7      p\        P                  ! Wy^ ^ R7      pV^ 8X  d   RpM:\        P                  ! Wg,
          V,          4      p\        P                  ! V^4      pV
P                  V R	V R
V RV R24       K  	  \        RRP                  V
4      4       R# R# )zp
Compare lists of mpmath.mpf's or mpmath.mpc's directly so that it
can be done to higher precision than double.
Nz,Lengths of inputs res and std are not equal. zBad results (z out of z) for the following points:r   r   r   z != z (rdiff )Fr   )r   r   r
   r   fabsappendrq   rU   r   r   r   r   r   join)resstdr   r   failureskresvalstdvalnfailndigitsmsgresrepstdreprdiffs   &&&&          r   mp_assert_allcloser&    sb   
 H(S)>?F>V^KLL;;v'$fkk&6I1I*IIOOQ/0	  @ MEqyc"((4.)*d

]5'!a%8STU!)Av[[AKF[[AKF{V_f$<=E1-JJ!Bvhd6((5'CD "* 	tyy~& r   )r   gFFg<)#r   r   r   	itertoolsr   numpyr   numpy.testingr   r   scipy.special._testutilsr   r   ImportErrorr   rB   rM   r_   r~   r   r   r   r   r   r   r   dirr  r  r   r   r  r  r  r&  r   r   r   <module>r-     s    	 
  !  !  6	l l^ 	2 	2
 
 l0 l0^
	?9(CK'E
	9 	 T 1h'{  		Z
  Es#   B* 1B7 *B43B47	CC