+
    /i/                        R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
Ht ^ RIt^ RIt ^ RIt^ RIHt ^ RIHt Rt]P,                  ! ]4      ]P.                  ! ]4      8  d   Rt. ROtRt]P6                  ! R	4      ;'       g    R
tR]9   d   RtR]P:                  ^ ,          9   t ! R R]4      t  ! R R4      t! ! R R4      t"R t#R t$R t%R t&R t'R t(R#   ] d    Rt Li ; i)z
Generic test utilities.

N)module_from_specspec_from_file_location)version)_pep440z3.0.8PytestTester_TestPythranFuncFHOST_GNU_TYPE muslTeditablec                       ] tR t^3tRtRtR# )FPUModeChangeWarningzWarning about FPU mode change N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       S/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/_lib/_testutils.pyr   r   3   s    'r   r   c                   4   a  ] tR t^8t o RtR tRR ltRtV tR# )r   a  
Run tests for this namespace

``scipy.test()`` runs tests for all of SciPy, with the default settings.
When used from a submodule (e.g., ``scipy.cluster.test()``, only the tests
for that namespace are run.

Parameters
----------
label : {'fast', 'full'}, optional
    Whether to run only the fast tests, or also those marked as slow.
    Default is 'fast'.
verbose : int, optional
    Test output verbosity. Default is 1.
extra_argv : list, optional
    Arguments to pass through to Pytest.
doctests : bool, optional
    Whether to run doctests or not. Default is False.
coverage : bool, optional
    Whether to run tests with code coverage measurements enabled.
    Default is False.
tests : list of str, optional
    List of module names to run tests for. By default, uses the module
    from which the ``test`` function is called.
parallel : int, optional
    Run tests in parallel with pytest-xdist, if number given is larger than
    1. Default is 1.

c                    Wn         R # Nmodule_name)selfr   s   &&r   __init__PytestTester.__init__V   s    &r   Nc                   ^ RI p\        P                  V P                  ,          p	\        P
                  P                  V	P                  ^ ,          4      p
RR.pVf   . pW,          p\        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        R4      hV'       d9   \        V4      ^8  d)   VRR	\        V4      ^,
          ,          ,           .,          pV'       d   VR
V
,           .,          pVR8X  d   VRR.,          pMVR8w  d   VRV.,          pVf   V P                  .pVeD   V^8  d=   \        4       '       d   VR\        V4      .,          pM^ RIpVP                  R^R7       VR.\        V4      ,           ,          p VP!                  V4      pV^ 8H  #   \"         d   pTP$                  p Rp?T^ 8H  # Rp?ii ; i)    Nz--showlocalsz
--tb=shortc              3   D   "   T F  qR 8H  ;'       g    VR8H  x  K  	  R# 5i)-mz	--markersNr   ).0args   & r   	<genexpr>(PytestTester.__call__.<locals>.<genexpr>e   s"     GJSd{00c[00Js     TFzMust specify -m before ---vz--cov=fastr"   znot slowfullz-nzMCould not run tests in parallel because pytest-xdist plugin is not available.)
stacklevelz--pyargs)pytestsysmodulesr   ospathabspath__path__any
ValueErrorint_pytest_has_xdiststrwarningswarnlistmain
SystemExitcode)r   labelverbose
extra_argvdoctestscoveragetestsparallelr,   modulemodule_pathpytest_argsr8   r=   excs   &&&&&&&&       r   __call__PytestTester.__call__Y   s   T--.ggoofooa&89%|4J!3GJG333GJGGG899s7|a'C#s7|A~"6677KH{233KF?D*--Kf_D%=(K=%%&EHqL ""c(m44 F)*  , 	
|d5k11	;;{+D 	  	88D		s   F4 4G?GGr   )r)      NFFNN)	r   r   r   r   r   r   rI   r   __classdictcell____classdict__s   @r   r   r   8   s     :'. .r   c                   6  a  ] tR t^t o Rt]P                  ]P                  ]P                  ]P                  ]P                  ]P                  .t]P                  ]P                  .t]P                   ]P"                  .tR tR tR tR tR tR tR tR	tV tR
# )r   a$  
These are situations that can be tested in our pythran tests:
- A function with multiple array arguments and then
  other positional and keyword arguments.
- A function with array-like keywords (e.g. `def somefunc(x0, x1=None)`.
Note: list/tuple input is not yet tested!

`self.arguments`: A dictionary which key is the index of the argument,
                  value is tuple(array value, all supported dtypes)
`self.partialfunc`: A function used to freeze some non-array argument
                    that of no interests in the original function
c                0    / V n         R V n        R V n        R # r   )	argumentspartialfuncexpected)r   s   &r   setup_method_TestPythranFunc.setup_method   s    r   c                    \         P                  ! V4      p/ pVP                  P                  4        F=  w  rEVP                  \         P
                  P                  Jg   K/  VP                  W4&   K?  	  V# r   )inspect	signature
parametersitemsdefault	Parameterempty)r   funcrX   optional_argskr(   s   &&    r   get_optional_args"_TestPythranFunc.get_optional_args   s`     %%d+	((..0DAyy 1 1 7 77#$99  1 r   c                    ^ pV P                    F0  p\        V P                   V,          ^,          4      pW18  g   K.  TpK2  	  V# )r    )rQ   len)r   max_lenarg_idxcur_lens   &   r   get_max_dtype_list_length*_TestPythranFunc.get_max_dtype_list_length   s?    ~~G$..1!45G ! & r   c                R    V\        V4      ^,
          8  d
   VR,          # W,          # )rK   )rd   )r   
dtype_list	dtype_idxs   &&&r   	get_dtype_TestPythranFunc.get_dtype   s(     s:q((b>!((r   c                T   \        V P                  4       4       F  p. pV P                   Fe  pV P                  V P                  V,          ^,          V4      pVP	                  V P                  V,          ^ ,          P                  V4      4       Kg  	  V P                  ! V!   K  	  R# )rK   N)rangerh   rQ   rn   appendastypepythranfunc)r   type_idx
args_arrayrf   	new_dtypes   &    r   test_all_dtypes _TestPythranFunc.test_all_dtypes   s    d<<>?HJ>> NN4>>'+B1+E+35	!!$.."9!"<"C"CI"NO * j) @r   c                    . pV P                    F@  pVP                  V P                   V,          ^ ,          RRR1,          RRR1,          4       KB  	  V P                  ! V!   R# )r    Nrk   )rQ   rr   rt   r   rv   rf   s   &  r   
test_views_TestPythranFunc.test_views   sQ    
~~GdnnW5a82>ttDE &*%r   c           	         . pV P                    FJ  pVP                  \        P                  ! V P                   V,          ^ ,          ^^ R7      R,          4       KL  	  V P                  ! V!   R# )r    )axis:NN   N)rQ   rr   nprepeatrt   r{   s   &  r   test_strided_TestPythranFunc.test_strided   s[    
~~Gbiiw(?(B()3368 9 & 	*%r   )rQ   rS   rR   N)r   r   r   r   r   r   int8int16int32int64intcintpALL_INTEGERfloat32float64	ALL_FLOAT	complex64
complex128ALL_COMPLEXrT   ra   rh   rn   rx   r|   r   r   rL   rM   s   @r   r   r      s      77BHHbhh"''277KKRZZ(I<</K
)*&& &r   c                 "    ^ RI Hp  V ! R4      RJ# )zI
Check if the pytest-xdist plugin is installed, providing parallel tests
	find_specxdistN)importlib.utilr   r   s    r   r6   r6      s    
 )WT))r   c                \   ^ RI p \        \        P                  R,          4      pRP	                  V \        P                  R,          4      pW R,          8  d   VP                  V4       R# R#   \
         d2    \        4       pTf   TP                  R4       T  RTR,           R2p L]i ; i)zB
Check *free_mb* of memory is available, otherwise do pytest.skip
NSCIPY_AVAILABLE_MEMz={} MB memory required, but environment SCIPY_AVAILABLE_MEM={}zlCould not determine available memory; set SCIPY_AVAILABLE_MEM variable to free memory in MB to run the test.z MB memory required, but     .Az MB available)r,   _parse_sizer/   environformatKeyError_get_mem_availableskip)free_mbr,   mem_freemsgs   &   r   check_free_memoryr      s     	Orzz*?@AMTTRZZ 568 C-C    O%'KK I J	28C<.NOs   AA/ /9B+*B+c                    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/p\         P                  ! RP                  RP                  VP	                  4       4      4      V \         P
                  4      pV'       d   VP                  ^4      V9  d   \        R4      h\        VP                  ^4      4      WP                  ^4      ,          ,          # )r	   r   bg      ?r`        @@MGg    eATg   mBkbMbGbTbkibg      @MibGibTibz^\s*(\d+)\s*({})\s*$|zInvalid size stringg      0Ag      Ag      pB)	rematchr   joinkeysIgroupr4   float)size_strsuffixesms   &  r   r   r      s    CSS#sCc4c4dCtvui	5)	UH
 	(//0IJ	A 
(*.//x
333r   c                     ^ RI p V P                  4       P                  #   \        \        3 d     Mi ; i\
        P                  P                  R4      '       d   / p\        R4      ;_uu_ 4       pT FR  pTP                  4       p\        T^,          4      R,          Y^ ,          P                  R4      P                  4       &   KT  	  RRR4       M  + '       g   i     M; iRT9   d
   TR,          # TR,          TR,          ,           # R# )	z<
Get information about memory available, not counting swap.
Nlinuxz/proc/meminfor   :memavailablememfreecached)psutilvirtual_memory	availableImportErrorAttributeErrorr-   platform
startswithopensplitr   striplower)r   infoflineps        r   r   r      s    $$&000(  ||w''/""aJJL05adc0AqTZZ_**,-  #"""
 T!''	?T(^33s     441ACC#	c                  aa	 ^ RI p \        P                  ! RR.4       V \        \        P                  ! 4       4      ,          p \        P                  P                  V4      ^,          p\        P                  ! WV,          4       W,          R,          R,          pVR,          o	\        P                  ! S	RR	7       \        VR
,          4      p\        VR4      ;_uu_ 4       pVP                  R4       VP                  R\         P"                   R24       RRR4       \         P$                  R8X  d*   \        P                  ! RRRRVR\        V4      .S	R7       M&\        P                  ! RRRV\        V4      .S	R7       \        P                  ! . ROS	R7       \&        P(                  ! R4      oVV	3R lpV! R4      V! R4      3#   \         d    TP	                  R4        ELi ; i  + '       g   i     L; i)z
Helper function to test building and importing Cython modules that
make use of the Cython APIs for BLAS, LAPACK, optimize, and special.
Nmesonz	--versionzNo usable 'meson' foundrC   _cython_examplesbuildT)exist_okzinterpreter-native-file.iniwz[binaries]
z
python = ''win32setupz--buildtype=releasez--native-filez--vsenv)cwd
EXT_SUFFIXc                    < SV ,          P                  S4      p\        W4      p\        V4      pVP                  P	                  V4       V# r   )with_suffixr   r   loaderexec_module)modnamesospecmodsuffix
target_dirs   &   r   load$_test_cython_extension.<locals>.loadE  sC    7"//7&w3t$$
r   	extendingextending_cpp)r   compilez-vv)r,   
subprocess
check_callFileNotFoundErrorr   r7   	threading	get_identr/   r0   r   shutilcopytreemakedirsr   writer-   
executabler   	sysconfigget_config_var)
tmp_pathsrcdirr,   mod_name	build_dirnative_filer   r   r   r   s
   &&      @@r   _test_cython_extensionr     s   
 /w45
 #i11344H ww}}V$Q'H
OOFx/0#g-0BBIW$JKK
T* i"??@K	k3		1		*S^^,A./ 
  ||ww4.(#i.: #-		  	w.S^M",	  5:F %%l3F d?333[  /-./  
 	s   G %5G0G-,G-0H 	c           	     2  aa \         P                  ! V 4      oVV3R lp. p\        ^ V 4       F3  pVP                  \         P                  ! VV3V,           VR7      4       K5  	  V F  pVP                  4        K  	  V F  pVP                  4        K  	  R# )a  
Run a given function concurrently across a given number of threads.

This is equivalent to using a ThreadPoolExecutor, but using the threading
primitives instead. This function ensures that the closure passed by
parameter gets called concurrently by setting up a barrier before it gets
called before any of the threads.

Arguments
---------
n_workers: int
    Number of concurrent threads to spawn.
fn: callable
    Function closure to execute concurrently. Its first argument will
    be the thread id.
*args: tuple
    Variable number of positional arguments to pass to the function.
**kwargs: dict
    Keyword arguments to pass to the function.
c                 @   < SP                  4        S! V .VO5/ VB  R # r   )wait)iargskwargsbarrierfns   &*,r   closure(_run_concurrent_barrier.<locals>.closureg  s    
1tvr   )targetr  r  N)r   Barrierrq   rr   Threadstartr   )		n_workersr  r  r  r  workersr  workerr  s	   &f*,    @r   _run_concurrent_barrierr  P  s    * 	*G G1i y''V- 	. !
    r   )r   r   r   IS_MUSL))r   rW   r/   r   r   r   r-   r   r   r   r   r   numpyr   scipycythonCython.Compiler.Versionr   cython_version
scipy._libr   required_versionparseVersionr   __all__r  r   _vr2   IS_EDITABLERuntimeWarningr   r   r   r6   r   r   r   r   r  r   r   r   <module>r     s  
  	 	   
   D   #}}^$w7G'HH O 
 o.44"	R<G ENN1--	> 	
O OdE& E&P**4254p%o	  Fs   
C# #	C/.C/