+
    LV-j÷/  ã                   óä  € 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   ó    Úf/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/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"   é € ÐG¹J°S�d‰{×0Ð0˜c [Ñ0Ô0»Jùs   ‚ ’ 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×-Ñ-Õ.ˆÜ—g‘g—o‘o f§o¡o°aÕ&8Ó9ˆà% |Ð4ˆàÒØˆJØÕ!ˆß‹3ÑG¹JÓG�3�3Š3ÑG¹JÓG×GÒGäÐ8Ó9Ð9ç”s˜7“| aÔ'Ø˜C #¤s¨7£|°A¥~Õ"6Õ6Ð7Õ7ˆKçØ˜H {Õ2Ð3Õ3ˆKà�FŒ?Ø˜D *Ð-Õ-‰KØ�fŒ_Ø˜D %˜=Õ(ˆKàŠ=Ø×%Ñ%Ð&ˆEàÒ H¨q¤LÜ ×"Ò"Ø ¤c¨(£mÐ4Õ4‘ãØ—‘ð Fà)*ð ô ,ð 	˜
�|¤d¨5£kÕ1Õ1ˆð	Ø—;‘;˜{Ó+ˆDð ˜‘	Ðøô ô 	Ø—8‘8ŒDà˜‘	Ðûð	ú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Ó+ˆ	ØˆØ×(Ñ(×.Ñ.Ö0‰DˆAØ�y‰y¤× 1Ñ 1× 7Ñ 7Õ7Ø#$§9¡9�Ó ñ 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Ó5ˆGØÖ Ø!’ñ &ð ˆ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ØŸ>œ>�Ø ŸN™N¨4¯>©>¸'Õ+BÀ1Õ+EØ+3ó5�	à×!Ñ! $§.¡.°Õ"9¸!Õ"<×"CÑ"CÀIÓ"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Ø×Ñ˜dŸn™n¨WÕ5°aÕ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Ø×ÑœbŸiši¨¯©°wÕ(?ÀÕ(BØ()°ô3Ø36õ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‚   ø‡ € ñð —7‘7˜BŸH™H b§h¡h°·±¸"¿'¹'À2Ç7Á7ÐK€KØ—‘˜RŸZ™ZÐ(€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ÜœrŸz™zÐ*?Õ@ÓAˆØM×TÑTØ”R—Z‘ZÐ 5Õ6ó8ˆð ˜C•-ÔØ�‰�CÖñ  øô ô OÜ%Ó'ˆØÒØ�K‰Kð Iô Jà�	Ð2°8¸Cµ<°.ÀÐ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    eÍÍAÚ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˜#˜s C¨¨c°4Ø�c˜4  d¨C°°tØ�v˜u i°¸	À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Û�Ø—J‘J“L�Ü05°a¸µd³¸cÕ0A��q•T—Z‘Z “_×*Ñ*Ó,Ó-ñ ÷ #×"×"Ð"úð
 ˜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LÌi ; 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Õ4€Hô �w‰w�}‰}˜VÓ$ QÕ'€HÜ
‡O‚O�F xÕ/Ô0ØÕ# gÕ-Ð0BÕB€IØ˜WÕ$€JÜ‡K‚K�
 TÕ*ô �iÐ"?Õ?Ó@€KÜ	ˆk˜3×	Ô	 1Ø	�‰�ÔØ	�‰�*œSŸ^™^Ð,¨AÐ.Ô/÷ 
 ô ‡|�|�wÔÜ×Ò˜w¨Ø4Ø.°Ø(¬#¨i«.ð:ð #-ö		 ô 	×Ò˜w¨Ø.°¼SÀ»^ðMà",õ	 ô ×ÒÒ5¸:ÕFô ×%Ò% lÓ3€Föñ �Ó™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Ü�1�iÖ ˆØ�‰”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ð ˜EŸN™N¨1Õ-Ñ-€ô	˜>ô 	÷
Oñ O÷dE&ñ E&òP*òò*4òò254ôp%øðo	 ô Ø‚Fðús   ´
C# Ã#	C/Ã.C/