Files
intellecton/venv/lib/python3.12/site-packages/scipy/__pycache__/conftest.cpython-312.pyc
T

195 lines
25 KiB
Plaintext
Raw Normal View History

Ë
|Rjpã
ó
ddlZddlZddlZddlZddlZddlZddlmZddlm Z ddl
Z ddl Z ddl
Z
dZddlmZddlmZmZmZmZmZmZmZmZddlmZdd lmZdd
lm Z  dd l!m"Z"dZ# ddl%Z%dZ&d Z(d
Z)e jTdd¬«d«Z+e&se jTd«Z,hd£Z-e j\e de j^j`¬«gZ1e2«Z3e2«Z4er` ddl5Z5e1jme j\e5de j^j`¬««e jne5jp«e jrd«kred«e5jtd¬« ddl;Z;e1jme j\e;de j^j`¬««e;jxe«edk7re3j{d«ej|dd¬«Z?e?dk(re;j€e;j«ne?dk7r eBd e?d!« ddlCZCe1jme j\eCd"e j^j`¬««e3j{d"«ejˆd#d$eE¬%«dd&lFmGZG[G ddlHZIe1jme j\eIjd'e j^j`e j^j”g¬««eIjj™d(d«eIjj™d)eIjše«d«edk7re3j{d'«e4j{d'« ddlNmOZPe1jme j\ePd*e j^j`e j^j”g¬««e4j{d*«e1Dchc]}|Œc}ZReRe-z
rJeSeeT«rde«d+vrQe2ee««ZWeWd,hk7r3eWeRz
rd-eRd.eWZXeBeX«e1Dcgc]}|eWvr|Œc}Z1e jTe1¬/«d0„«ZYe j^ed1¬2«Z[d3„Z\d4e d5e d6d7dfd8„Z^e jTd9„«ZMerÊe
ee«d:««e
d;dd¬<«e
d=ddddefe
«¬>«ed?d=«Zje
ej«e#r£edNd@„«Zlele"_me2gdA¢«e"_ne jpdBkr#e"jÜj™e2gdC¢««gdD¢e"_odEdEdFdGdHdIœe"_pe2dJg«e"_qdKgdL¢ie"_rde"_se"jèj{dM«yy#e$rdZYŒíwxYw#e$$rdZ#YŒÆwxYw#e'$rdZ&YŒÍwxYw#e$rYŒßwxYw#e$rYŒ?wxYw#e$rYŒáwxYw#e$rYŒwxYw#e$rYŒÄwxYwcc}wcc}w)OéN)Úcontextmanager)ÚLiteralTF)Ú get_fpu_mode)ÚSCIPY_ARRAY_APIÚ SCIPY_DEVICEÚarray_namespaceÚ
default_xpÚis_cupyÚis_daskÚis_jaxÚis_torch)ÚFPUModeChangeWarning)Úpatch_lazy_xp_functions)Ú_pep440)Ú dt_configcón|jdd«|jdd«|jdd«|jdd«|jdd«|jdd« dd l} dd lm}t
s6|jdd
«|jdd«|jdd«t jdk(r,tjdkrtjdd¬«y y y #t$r|jdd
«YŒ wxYw#t$r|jdd «YŒºwxYw)a
Add pytest markers to avoid PytestUnknownMarkWarning
This needs to contain all markers that are SciPy-specific, as well as
dummy fallbacks for markers defined in optional test packages.
Note that we need both the registration here *and* in `pytest.ini`.
Úmarkerszslow: Tests that are very slow.zHxslow: mark test as extremely slow (not run unless explicitly requested)z8xfail_on_32bit: mark test as failing on 32-bit platformsz;array_api_backends: test iterates on all array API backendsz±skip_xp_backends(backends, reason=None, np_only=False, cpu_only=False, eager_only=False, exceptions=None): mark the desired skip configuration for the `skip_xp_backends` fixturez´xfail_xp_backends(backends, reason=None, np_only=False, cpu_only=False, eager_only=False, exceptions=None): mark the desired xfail configuration for the `xfail_xp_backends` fixturerNz.timeout: mark a test for a non-default timeout)Úparse_durationz8fail_slow: mark a test for a non-default timeout failurezUparallel_threads_limit(n): run the given test function in parallel using `n` threads.z8thread_unsafe: mark the test function as single-threadedzCiterations(n): run the given test function `n` times in each threadÚposix)ééÚ
forkserverT)Úforce) Úaddinivalue_lineÚpytest_timeoutÚ ExceptionÚpytest_fail_slowrÚPARALLEL_RUN_AVAILABLEÚosÚnameÚsysÚ version_infoÚmultiprocessingÚset_start_method)Úconfigrrs úQ/home/antigravity/intellecton/venv/lib/python3.12/site-packages/scipy/conftest.pyÚpytest_configurer')s^ð ×јIØ
×јIØTà
×јIØDà
×јIØGà
×ј
 ×јIð

IÛðSõ
×ÑØ ð
 ×ÑØ Ø 
ð ×ÑØ Ø 
ô

‡wwœc×Ò ×¸TÖøô3 òIØ×ÑØ Ð IðIûô òSØ×ÑØ Ð SðSús$Á.C5Á3DÃ5DÄDÄD4Ä3D4cóx|jd«}|A ttjj dd««}|st
jd«|jd«}|Gtjd«jdkr%t
jd |jd«tj«5tjd
t j « dd lm}d }|rc ttjd
«}tj*d«s1tj,«dz}t/||zd«} |d¬«ddd«y#t
$rd}YŒ/wxYw#t&$rd}YŒwxYw#t($r Yddd«ywxYw#t&$r Yddd«ywxYw#1swYyxYw)xslowÚ SCIPY_XSLOWÚ0Fz@very slow test; set environment variable SCIPY_XSLOW=1 to run itÚxfail_on_32bitréz&Fails on our 32-bit test platform(s): Úignore)Úthreadpool_limitsTÚPYTEST_XDIST_WORKER_COUNTÚOMP_NUM_THREADSééÚblas)Úuser_api)Úget_closest_markerÚintrÚenvironÚgetÚ
ValueErrorÚpytestÚskipÚnpÚintpÚitemsizeÚxfailÚargsÚwarningsÚcatch_warningsÚ simplefilterÚ PytestUnraisableExceptionWarningÚ
threadpoolctlr/rÚKeyErrorÚgetenvÚ cpu_countÚmax)ÚitemÚmarkÚvr/ÚHAS_THREADPOOLCTLÚxdist_worker_countÚmax_openmp_threadsÚthreads_per_workers r&Úpytest_runtest_setuprReØ × "  +€DØ Ðð Ü”B—J‘J—N‘N =°#Ó7ˆAñÜ K‰KðKô
Là × "Ð#3Ó 4€DØ ÐœBŸG™G A›J×/°!Ò Ð=¸d¿i¹iȹl¸^Ð
× Ñ Ó "ñÜ×ј×(OÑ(OÔ 7à $Ð ñ
ð

Ü%(¬¯©Ð4OÑ)PÓ%QÐ
—9/Ü%'§\¡\£^°qÑ%8Ð"Ü%(Ð);Ð?QÑ)QÐSTÓ%UÐÙ%Ð&8À6ÕJ÷5ðøôò Ø‹Að ûô$ò &à %Ò ð &ûôò
à÷)ðð$
ûôð÷=ðð6ú÷7ðúsƒ•)EÃ%F0Ã)E1Ã1F0Ã4FÄ;F0Å
FÅ E.Å-E.Å1 E?Å<F0Å>E?Å?F0Æ FÆ F0ÆFÆF0Æ F-Æ"F0Æ,F-Æ-F0Æ0F9Úfunction)ÚscopeÚautousec#ó’Kt«}dt«}||k7r&tjd|dd|ddtd¬«yy­w)z9
Check FPU mode was not changed during the test.
NzFPU mode changed from z#xz to z during the testr)ÚcategoryÚ
stacklevel)rrBÚwarnr)ÚrequestÚold_modeÚnew_modes r&Úcheck_fpu_moder]sTèø€ô
‹~€HÛ Ü‹~€HàÜ
Ð.¨x¸¨m¸4Àȸ}ðMö CðùsAAcóy)Nr3©r_ór&Únum_parallel_threadsra¦sàr`>ÚcupyÚnumpyÚtorchÚarray_api_strictú jax.numpyú
dask.arrayrc)ÚidÚmarksrez2.3z'array-api-strict must be >= version 2.3z2024.12)Ú api_versionrdÚcpuÚSCIPY_DEFAULT_DTYPEÚfloat64)ÚdefaultÚfloat32zUSCIPY_DEFAULT_DTYPE env var, if set, can only be either 'float64' or 'float32'. Got 'z
' instead.rbr.z#cupyx.jit.rawkernel is experimental©rW)ÚsignalrfÚjax_enable_x64Újax_default_devicerg)ÚtrueÚallrvz!'--array-api-backend' must be in z; got )Úparamsc#ó>Kt|d«t|d«|j}t|jd««}tr9t ||j¬«5t
|«5|ddd«ddd«y|y#1swYŒxYw#1swYyxYw­w)a´Run the test that uses this fixture on each available array API library.
You can select all and only the tests that use the `xp` fixture by
passing `-m array_api_backends` to pytest.
You can select where individual tests run through the `@skip_xp_backends`,
`@xfail_xp_backends`, and `@skip_xp_invalid_arg` pytest markers.
Please read: https://docs.scipy.org/doc/scipy/dev/api-dev/array_api.html#adding-tests
r<r@r©rZÚxpN)Úskip_or_xfail_xp_backendsÚparamrÚemptyrrr rys r&rzrz&sèø€ô˜g vÔ˜g wÔ€Bä ˜Ÿ !›Ó %€Båô%¨W¸¿¹Ô
 ô
˜B“ñ
Ø÷
÷  ð ð÷
ð
ú÷  ð üs6ABÁ BÁ*BÁ/BÁ7BÂB Â
BÂBÂBzsTest involves masked arrays, object arrays, or other types that are not valid input when `SCIPY_ARRAY_API` is used.©Úreasonc ót|jj|d««}tDcic]}|gŒ}}|D]“}t |j
«hd£z
}|rt
d|«t |j
jdg««}|tz
}t|tz
«x}rtd|dtt««|j
jdd«rT|j
jd «xsd
} |j«D]!\}}
|d k7sŒ ||vsŒ|
j| «Œ#n»|j
jd d«rB|j
jd «xsd
} t|z
D]}||j| «Œn]|j
jdd«rA|j
jd «xsd} t|z
D]}||j| «Œt|j«dk(r“|jd}|tvrtd|dtt««|j
jd «xsd|} ||jd| «dD] } | |j
vsŒt| d|«Œdt|j«dkDsŒ~td|j«|j«D
cic]
\}}
|
r||
dŒc}
}Scc}wcc}
}w)ztA helper for {skip,xfail}_xp_backends.
Return dict of {backend to skip/xfail: top reason to skip/xfail it}
Ú _xp_backends>rÚnp_onlyÚcpu_onlyÚ
eager_onlyÚ
exceptionszInvalid kwargs: r…zUnknown backend(s): z; must be a subset of rFrz"do not run with non-NumPy backendsrczTno array-agnostic implementation or delegation available for this backend and devicer„z*eager checks not executed on lazy backendsr3rzUnknown backend: z; must be one of z#do not run with array API backend: )rr„r…z is mutually exclusive with z,Please specify only one backend per marker: )ÚlistÚnodeÚ iter_markersÚxp_known_backendsÚsetÚkwargsÚ TypeErrorr9r:ÚitemsÚappendÚxp_skip_cpu_only_backendsÚxp_skip_eager_only_backendsÚlenrAÚinsert) rZÚ
skip_or_xfailrÚbackendÚreasonsÚmarkerÚinvalid_kwargsr…Úinvalid_exceptionsrÚbackend_reasonsÚkwargs r&Ú_backends_kwargs_from_requestrPsDô
7—<<×
¨¸lÐ-KÓM€GÜ*;Ö<˜wˆw˜‰{Ð<€GÐó2ˆÜ˜VŸ]™]Ó/IñIˆá ÜÐ.¨~Ð.>Ð ˜Ÿ×*¨<¸Ó=ˆ
Ø'Ô*;ÑÜ"& zÔ4EÑ'EÓ"FÐ Ð Ð3Ð4FÐ3GðH4Ü48Ô9JÓ4KÐ3LðNóOð
Oð =‰=× Ñ ˜Y¨Ô —]]×& XÐ4XˆFØ,3¯M©M«Oò
(˜Ø˜%¨'¸Ò*CØ#×*¨6Õ
]‰]×
Ñ
˜z¨5Ô
—]]×& 
ô5°zÑ
0Ø˜Ñ ×Õ
]‰]×
Ñ
˜|¨UÔ
—]]×& 
ä6¸Ñ
0Ø˜Ñ ×Õ
 ˆv{‰{Ó ˜qÒ Ø—k‘k !‘nˆGØÔ Ð#4°W°Ið>3Ü37Ô8IÓ3JÐ2Kð"MóNðNà—]]×& AØ5°g°YÐ
ð
 × # A  
VؘFŸM™MÒ wÐ.JÈ7È)Ð%TÓ
VôÓ
 Ô
Ø>¸v¿{¹{¸ð
ða2ðj-4¯M©M«O÷ Ù(˜Ùð
_   ð ùòm=ùól s °
K>Ë(LrZr“)r<r@ÚreturncóÐ|d|jvryt||¬«}|j}|j|vr-||j}|sJt t
|«}||¬«yy)aP
Helper of the `xp` fixture.
Skip or xfail based on the ``skip_xp_backends`` or ``xfail_xp_backends`` markers.
See the "Support for the array API standard" docs page for usage examples.
Usage
-----
::
skip_xp_backends = pytest.mark.skip_xp_backends
xfail_xp_backends = pytest.mark.xfail_xp_backends
...
@skip_xp_backends(backend, *, reason=None)
@skip_xp_backends(*, cpu_only=True, exceptions=(), reason=None)
@skip_xp_backends(*, eager_only=True, exceptions=(), reason=None)
@skip_xp_backends(*, np_only=True, exceptions=(), reason=None)
@xfail_xp_backends(backend, *, reason=None)
@xfail_xp_backends(*, cpu_only=True, exceptions=(), reason=None)
@xfail_xp_backends(*, eager_only=True, exceptions=(), reason=None)
@xfail_xp_backends(*, np_only=True, exceptions=(), reason=None)
Parameters
----------
backend : str, optional
Backend to skip/xfail, e.g. ``"torch"``.
Mutually exclusive with ``cpu_only``, ``eager_only``, and ``np_only``.
cpu_only : bool, optional
When ``True``, the test is skipped/xfailed on non-CPU devices,
minus exceptions. Mutually exclusive with ``backend``.
eager_only : bool, optional
When ``True``, the test is skipped/xfailed for lazy backends, e.g. those
with major caveats when invoking ``__array__``, ``__bool__``, ``__float__``,
or ``__complex__``, minus exceptions. Mutually exclusive with ``backend``.
np_only : bool, optional
When ``True``, the test is skipped/xfailed for all backends other
than the default NumPy backend and the exceptions.
Mutually exclusive with ``backend``. Implies ``cpu_only`` and ``eager_only``.
reason : str, optional
A reason for the skip/xfail. If omitted, a default reason is used.
exceptions : list[str], optional
A list of exceptions for use with ``cpu_only``, ``eager_only``, or ``np_only``.
This should be provided when delegation is implemented for some,
but not all, non-CPU/non-NumPy backends.
rN)r“r~)Úkeywordsrr|Ú__name__Úgetattrr;)rZr“Úskip_xfail_reasonsrzrs r&r{r{ssð` ˆ˜ Ð%¨W×-=Ñ-=Ñä˜}ôÐð
€BØ ‡{# B§K¡KÑÙˆ
ˆ¤¨
Ó6ˆ
Ù˜)r`cóLt|«rtjd¬«t|«rddgSt |«rtjd¬«t |«r'|j
«j«}d|D«S|j
«j«dgzS)aoFixture that returns a list of all devices for the backend, plus None.
Used to test input->output device propagation.