K i! 6dZddlZddlZddlZddlZddlZddlmZddlZddl Z ddl Z ddl Z ddl m Z ddlmZmZddlmZ ddlmZdZdaiZej2j5ej6j9ej:d ej<j?d dd ej<j?d dddde ejBej6j9ej6jEe#ddZ$ej<jKej6jMe$rd nd dejNd<dZ(dZ)dZ*erejVZ*dZ,dZ-e j\dZ/e j`dddZ1e j`ddZ2e j`ddZ3ered4dZ4e4e_5ejljodejljod de_8ddl9Z9e9jte9jvze_<e jzj|ej~d!<hd"e_@d#d#d$d%d&d'd(e_Agd)e_Be j`d*ZCe j`dd g+d,ZDe j`d-dee jeFd.d/ggd01d2ZGe j`d3ZHy#e$rd ZYwxYw)5z= Pytest configuration and fixtures for the Numpy test suite. N)contextmanager) get_fpu_mode)get_stringdtype_dtypepd_NA) NOGIL_BUILD) dt_configTFz .hypothesisz numpy-profile)namedeadline print_blobznp.test() profile)r r r database derandomizesuppress_health_checkz..z pytest.ini1NUMPY_EXPERIMENTAL_DTYPE_APIc|jdd|jdd|jdd|jddy)Nmarkersz=valgrind_error: Tests that are known to error under valgrind.z:leaks_references: Tests that are known to leak references.zslow: Tests that are very slow.z,slow_pypy: Tests that are very slow on pypy.)addinivalue_line)configs T/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/numpy/conftest.pypytest_configurer;sP IGI IDF I)+ I68c.|jddddy)Nz--available-memorystorezSet 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: determinedautomatically.)actiondefaulthelp) addoption)parsers rpytest_addoptionrFs! )'4,.rcf|jjd}||tjd<yy)Navailable_memoryNPY_AVAILABLE_MEM)r getoptionosenviron)session available_mems rpytest_sessionstartr(Us1NN,,-?@M *7 &'!rctrtstjr|}|j |j dddd|j d|j d|j d|j d|j d |j d |j d tjd d yyyy)NzGIL re-enabled=T)sepredboldz3The 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.zGIL re-enabled during tests) returncode) rgil_enabled_at_startsys_is_gil_enabledensure_newlinesectionlinepytestexit)terminalreporter exitstatusrtrs rpytest_terminal_summaryr<[s/C4G4G4I   #$T B EF MN KL   MN LM LM 1a@5J/{rc`t}t|ay|tk7rt|ft|<|ayy)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)r _old_fpu_mode_collect_results)itemmodes rpytest_itemcollectedrBjs8 >D  "/!6  rfunction)scopeautousec#Kt}dt}||k7rtd|dd|ddtj|j}||\}}td|dd|ddyw)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)rAssertionErrorr?getnode)requestold_modenew_modecollect_results rcheck_fpu_moderN~s ~H ~H8?}D (},<>? ?&))',,7N!+(?}D (},EGH H"sA-A/)rEct|d<y)Nnp)numpy)doctest_namespaces radd_nprSs #drc(|jddy)NPYTHONHASHSEED0)setenv) monkeypatchs r env_setuprYs'-rc#*Kgd}dj|}ddg}dj|}tj5tjdt|tjdt |ddddy#1swYyxYww)z4Filter out the wall of DeprecationWarnings. ) zThe numpy.linalg.linalgzThe numpy.fft.helperdep_util pkg_resourcesznumpy.core.umath msvccompilerzDeprecated callz numpy.corezImporting from numpy.matlibzThis function is deprecated.zData type alias 'a'zArrays of 2-dimensional vectorsz`in1d` is deprecated|zinvalid value encounteredzdivide by zero encounteredignore)categorymessageN)joinwarningscatch_warningsfilterwarningsDeprecationWarningRuntimeWarning)testmsgsmsgmsgs_rmsg_rs rwarnings_errors_and_rngrms *hhtn ( (    $ $ &   # ##5s   # #>5     s?B=B> BB Bz#uninitializedz# uninitialized StringDType> numpy.saveznumpy.matlib.saveznumpy.__array_namespace_info__%numpy.matlib.__array_namespace_info__r.z needs pandasz#errors out in /testing/overrides.pyz(.. testcode:: admonitions not understoodzmanipulates warnings)zhow-to-verify-bug.rstzc-info.ufunc-tutorial.rstzbasics.interoperability.rstzbasics.dispatch.rstzbasics.subclassing.rstzmisc.rst)znumpy/distutilsznumpy/_core/cversions.pyznumpy/_pyinstallerznumpy/random/_examplesz"numpy/f2py/_backends/_distutils.pycttjtjz}t j |d}tj j|dd}|jdS)NU1)dtypeiT)sizereplaceU100) liststring ascii_lettersdigitsrParrayrandomchoiceview)charsrets rrandom_string_listrsU %% 5 6E HHU$ 'E ))  5x  >C 88F r)paramsc|jSNparamrJs rcoercers ==runsetnan__nan__)rNonez pandas.NAznp.nanz float('nan')z string nan)ridsc|jSrrrs r na_objectrs ==rct||Sr)r)rrs rrurus F 33rr)I__doc__r$rzr2tempfilerc contextlibr hypothesisr7rQrPnumpy._core._multiarray_testsrnumpy._core.tests._natyperrnumpy.testing._private.utilsrscipy_doctest.conftestr HAVE_SCPDTModuleNotFoundErrorr>r? configurationset_hypothesis_home_dirpathrb gettempdirsettingsregister_profilery HealthCheckdirname__file__ _pytest_ini load_profileisfiler%rrr1r3r(r<hookimplrBfixturerNrSrYrmuser_context_mgr rndm_markersadd strict_checkdoctestNORMALIZE_WHITESPACEELLIPSIS optionflagsdtypesrncheck_namespaceskiplistpytest_extra_xfailpytest_extra_ignorerrrfloatrrurrrsQ % 6B40J   00GGLL$$$& 6 $$ 4D% $$  dTtz556%ggll277??84dLI  ww~~k2O8K .1 )*8..3..08 A&j$/H0H&$$..D"9I/0 01"I#887;K;KKI05||/G/GIm,I"$%''5D"L* $I %I!e}%& T5"&&%, BN 44UJsL LL