Ë
    Bü´jE"  ã            
       ó4  — d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl	Z	ddl
Z
ddlZddlmZ ddlmZ 	 ddlmZ dZ	 ddlZdZdai Ze	j0                  j3                  ej4                  j7                   ej8                  «       d
«      «       e	j:                  j=                  ddd¬«       e	j:                  j=                  ddddd ee	j@                  «      ¬«       ej4                  j7                  ej4                  jC                  e"«      dd«      Z#e	j:                  jI                  ej4                  jK                  e#«      rdnd«       dejL                  d<   d„ Z'd„ Z(dZ)er ejT                  «       Z)d„ Z+d„ Z, e
jZ                  d¬«      d„ «       Z. e
j^                  dd¬«      d„ «       Z0 e
j^                  d¬«      d„ «       Z1er³ed*d„«       Z2e2e_3        ejh                  jk                  d«       ejh                  jk                  d «       de_6        ddl7Z7e7jp                  e7jr                  z  e_:        ejv                  jx                  ejz                  d!<   h d"£e_>        d#d#d$d%d&d'd(œe_?        g d)¢e_@        yy# e$ r d	ZY �ŒHw xY w# e$ r d	ZY �ŒOw xY w)+z=
Pytest configuration and fixtures for the Numpy test suite.
é    N)Úcontextmanager)ÚPath)Úget_fpu_mode)ÚNOGIL_BUILD)Ú	dt_configTFz.hypothesisznumpy-profile)ÚnameÚdeadlineÚ
print_blobznp.test() profile)r   r	   r
   ÚdatabaseÚderandomizeÚsuppress_health_checkz..z
pytest.iniÚ1ÚNUMPY_EXPERIMENTAL_DTYPE_APIc                 óê   — | j                  dd«       | j                  dd«       | j                  dd«       t        s7| j                  dd«       | j                  dd«       | j                  dd«       y y )NÚmarkersz=valgrind_error: Tests that are known to error under valgrind.z:leaks_references: Tests that are known to leak references.zslow: Tests that are very slow.zOparallel_threads(n): run the given test function in parallel using `n` threads.zCiterations(n): run the given test function `n` times in each threadz8thread_unsafe: mark the test function as single-threaded)Úaddinivalue_lineÚPARALLEL_RUN_AVAILABLE)Úconfigs    úL/root/workspace/ytshorts/venv/lib/python3.12/site-packages/numpy/conftest.pyÚpytest_configurer   >   s„   € Ø
×Ñ˜IØGôIà
×Ñ˜IØDôFà
×Ñ˜IØ)ô+å!Ø×Ñ 	ð!ô	
ð 	×Ñ 	ØQô	
ð 	×Ñ 	ØFõ	
ð "ó    c                 ó.   — | j                  ddd d¬«       y )Nz--available-memoryÚstorezðSet amount of memory available for running the test suite. This can result to tests requiring especially large amounts of memory to be skipped. Equivalent to setting environment variable NPY_AVAILABLE_MEM. Default: determined automatically.)ÚactionÚdefaultÚhelp)Ú	addoption)Úparsers    r   Úpytest_addoptionr   R   s!   € Ø
×ÑÐ)°'À4ð,ð õ .r   c                 óf   — | j                   j                  d«      }|�|t        j                  d<   y y )NÚavailable_memoryÚNPY_AVAILABLE_MEM)r   Ú	getoptionÚosÚenviron)ÚsessionÚavailable_mems     r   Úpytest_sessionstartr(   a   s1   € Ø—N‘N×,Ñ,Ð-?Ó@€MØÐ Ø*7Œ�
‰
Ð&Ò'ð !r   c                 ó´  — t         rÒt        sËt        j                  «       r¶| }|j	                  «        |j                  dddd¬«       |j                  d«       |j                  d«       |j                  d«       |j                  d«       |j                  d	«       |j                  d
«       |j                  d«       t        j                  dd¬«       y y y y )NzGIL re-enabledú=T)ÚsepÚredÚboldz3The GIL was re-enabled at runtime during the tests.z;This can happen with no test failures if the RuntimeWarningz9raised by Python when this happens is filtered by a test.Ú z;Please ensure all new C modules declare support for runningz:without the GIL. Any new tests that intentionally imports z:code that re-enables the GIL should do so in a subprocess.zGIL re-enabled during testsé   )Ú
returncode)	r   Úgil_enabled_at_startÚsysÚ_is_gil_enabledÚensure_newlineÚsectionÚlineÚpytestÚexit)ÚterminalreporterÚ
exitstatusr   Útrs       r   Úpytest_terminal_summaryr<   g   s¬   € ÝÕ/´C×4GÑ4GÔ4IØˆØ
×ÑÔØ
�
‰
Ð#¨°$¸Tˆ
ÔBØ
�‰ÐEÔFØ
�‰ÐMÔNØ
�‰ÐKÔLØ
�‰�ŒØ
�‰ÐMÔNØ
�‰ÐLÔMØ
�‰ÐLÔMÜ�‰Ð1¸aÖ@ð 5JÐ/€{r   )Útryfirstc                 ó<  — t        «       }t        €|an|t        k7  rt        |ft        | <   |at        | j                  «      j
                  t        t        «      j
                  dz  dz  k(  r0| j                  t        j                  j                  d¬«      «       yy)zÞ
    Check FPU precision mode was not changed during test collection.

    The clumsy way we do it here is mainly necessary because numpy
    still uses yield tests, which can execute code at test collection
    time.
    NÚf2pyÚtestszf2py tests are thread-unsafe)Úreason)r   Ú_old_fpu_modeÚ_collect_resultsr   ÚfspathÚparentÚ__file__Ú
add_markerr7   ÚmarkÚthread_unsafe)ÚitemÚmodes     r   Úpytest_itemcollectedrL   v   s‹   € ô ‹>€DäÐØ‰Ø	”Ò	Ü"/°Ð!6Ô˜ÑØˆô ˆD�K‰KÓ×Ñ¤4¬£>×#8Ñ#8¸6Ñ#AÀGÑ#KÒKØ�‰œŸ™×1Ñ1Ø1ð 2ó 3õ 	4ð Lr   Úfunction)ÚscopeÚautousec              #   óâ   K  — t        «       }d–— t        «       }||k7  rt        d|d›d|d›d�«      ‚t        j                  | j                  «      }|�|\  }}t        d|d›d|d›d�«      ‚y­w)zC
    Check FPU precision mode was not changed during the test.
    Nz FPU precision mode changed from z#xz to z during the testz when collecting the test)r   ÚAssertionErrorrC   ÚgetÚnode)ÚrequestÚold_modeÚnew_modeÚcollect_results       r   Úcheck_fpu_moderX   �   s�   è ø€ ô
 ‹~€HÛ	Ü‹~€Hà�8ÒÜÐ?ÀÈ¸}ÈDØ (¨˜}Ð,<ð>ó ?ð 	?ô &×)Ñ)¨'¯,©,Ó7€NØÐ!Ø+Ñˆ�(ÜÐ?ÀÈ¸}ÈDØ (¨˜}Ð,EðGó Hð 	Hð "ùs   ‚A-A/)rO   c                 ó   — t         | d<   y )NÚnp)Únumpy)Údoctest_namespaces    r   Úadd_npr]   £   s   € ä#Ð�dÒr   c              #   ó*  K  — g d¢}dj                  |«      }ddg}dj                  |«      }t        j                  «       5  t        j                  dt        |¬«       t        j                  dt
        |¬«       d–— ddd«       y# 1 sw Y   yxY w­w)z4Filter out the wall of DeprecationWarnings.
        )zThe numpy.linalg.linalgzThe numpy.fft.helperÚdep_utilÚpkg_resourcesznumpy.core.umathÚmsvccompilerzDeprecated callz
numpy.corezImporting from numpy.matlibzThis function is deprecated.zArrays of 2-dimensional vectorszANumPy warning suppression and assertion utilities are deprecated.znumpy.fix is deprecatedz!The chararray class is deprecatedznumpy.typename is deprecatedznumpy.ma.round_ is deprecatedú|zinvalid value encounteredzdivide by zero encounteredÚignore)ÚcategoryÚmessageN)ÚjoinÚwarningsÚcatch_warningsÚfilterwarningsÚDeprecationWarningÚRuntimeWarning)ÚtestÚmsgsÚmsgÚmsgs_rÚmsg_rs        r   Úwarnings_errors_and_rngrq   ª   s�   è ø€ ò
ˆð" �h‰h�t‹nˆð (Ø(ð
ˆð —‘˜Ó ˆä×$Ñ$Ó&ñ 	Ü×#Ñ#ØÔ#5¸sõô ×#Ñ#Ø¤>¸5õó ÷	÷ 	ñ 	üs   ‚?BÁ=BÁ>	BÂBÂBz#uninitializedz# uninitializedÚStringDType>   únumpy.savezúnumpy.matlib.savezúnumpy.__array_namespace_info__ú%numpy.matlib.__array_namespace_info__r.   zneeds pandasz#errors out in /testing/overrides.pyz(.. testcode:: admonitions not understoodzmanipulates warnings)zhow-to-verify-bug.rstzc-info.ufunc-tutorial.rstzbasics.interoperability.rstzbasics.dispatch.rstzbasics.subclassing.rstzmisc.rst)znumpy/distutilsznumpy/_core/cversions.pyznumpy/_pyinstallerznumpy/random/_examplesz"numpy/f2py/_backends/_distutils.py)N)AÚ__doc__r$   r2   Útempfilerg   Ú
contextlibr   Úpathlibr   Ú
hypothesisr7   r[   Únumpy._core._multiarray_testsr   Únumpy.testing._private.utilsr   Úscipy_doctest.conftestr   Ú
HAVE_SCPDTÚModuleNotFoundErrorÚpytest_run_parallelr   rB   rC   ÚconfigurationÚset_hypothesis_home_dirÚpathrf   Ú
gettempdirÚsettingsÚregister_profileÚlistÚHealthCheckÚdirnamerF   Ú_pytest_iniÚload_profileÚisfiler%   r   r   r1   r3   r(   r<   ÚhookimplrL   ÚfixturerX   r]   rq   Úuser_context_mgrÚrndm_markersÚaddÚstrict_checkÚdoctestÚNORMALIZE_WHITESPACEÚELLIPSISÚoptionflagsÚdtypesrr   Úcheck_namespaceÚskiplistÚpytest_extra_xfailÚpytest_extra_ignore© r   r   ú<module>rž      sÆ  ðñó 
Û 
Û Û Ý %Ý ã Û ã Ý 6Ý 4ðÝ0Ø€Jð#ÛØ!Ðð €ØÐ ð × Ñ × 0Ñ 0Ø‡G�G‡L�LÐ$�×$Ñ$Ó&¨Ó6ôð × Ñ × $Ñ $Ø	 4°Dð %ô ð × Ñ × $Ñ $Ø	Ø˜d¨T¸tÙ˜z×5Ñ5Ó6ð %ô ð �g‰g�l‰l˜2Ÿ7™7Ÿ?™?¨8Ó4°d¸LÓI€Ø 
× Ñ ×  Ñ  Ø—w‘w—~‘~ kÔ2�OÐ8Kôð
 .1€‡
�
Ð)Ñ *ò
ò(.ð Ð ÙØ.˜3×.Ñ.Ó0Ðò8òAð €‡�˜$Ôñ4ó  ð4ð0 €‡��j¨$Ô/ñHó 0ðHð& €‡�˜Ôñ$ó ð$ñ àò#ó ð#ðL "9€IÔð ×Ñ×ÑÐ/Ô0Ø×Ñ×ÑÐ0Ô1ð "€IÔãØ#×8Ñ8¸7×;KÑ;KÑK€IÔð 05¯|©|×/GÑ/G€I×Ñ˜mÑ,ò€IÔð "$Ø%'Ø'5ØDØ"LØ*ñ$€IÔ ò%€IÕ!ðW øðg ò ØƒJðûð ò #Ø"Óð#ús#   ¸I> ÁJ É>J	ÊJ	ÊJÊJ