Ë
    û�Dj;A  ã            
       óÂ  — d dl Z d dlZd dlZd dlZd dlmZ d dlZd dlm	Z
 d dlZd dlZd dlmZ d dlmZ d dlmZmZ d dlmZ 	 d dlmZ dZd
„ Zd„ Z ej8                  dd¬«      d„ «       ZdeiZe�rZ eee «      �rP	 d dl!Z!ejE                  de!i«        ejF                  e!jH                  «       ejJ                  d«      k  r e&d«      ‚ e!jN                  d¬«       	 d dl(Z(ejE                  de(i«        e(jR                  e«       	 d dl*Z*ejE                  de*i«       	 d dl+Z,ejE                  de,j                  i«       e,jZ                  jE                  dd«       e,jZ                  jE                  d e,j\                  e«      d    «        ej^                  «       dvr, e j`                  e«      Z1de1v rn	 e1D � ci c]  } | e|    “Œ
 c} Zdev rdZejl                  jo                  dejq                  «       «      Z9ejl                  ju                  ed¬ «      Z;ej8                  d!„ «       Z<ejz                  j}                  ej~                  j�                   ej‚                  «       d"«      «       ej„                  j‡                  d#dd¬$«       ej„                  j‡                  d%dddd eDejŠ                  «      ¬&«       ejŒ                  j�                  d'd%«      ZHej„                  j“                  eH«       er�ed6d(„«       ZJeJe_K         eLg d)¢«      e_M        ejH                  d*k  r#ejš                  jE                   eLg d+¢«      «       g d,¢e_N        d-d.d.d/d0d1d2œe_O         eLd3g«      e_P        d4d5gie_Q        yy# e$ r d	ZY �Œ8w xY w# e&$ r Y �Œ±w xY w# e&$ r Y �Œ“w xY w# e&$ r Y �Œ‡w xY w# e&$ r Y �Œ&w xY wc c} w # e2$ r dejg                  «       › �Z4 e5e4«      ‚w xY w)7é    N)Úcontextmanager)Úget_fpu_mode)ÚFPUModeChangeWarning)ÚSCIPY_ARRAY_APIÚSCIPY_DEVICE)Ú_pep440)Ú	dt_configTFc                 ó0  — | j                  dd«       | j                  dd«       | j                  dd«       	 dd l}	 ddlm} | j                  dd	«       y # t        $ r | j                  dd«       Y Œ7w xY w# t        $ r | j                  dd«       Y ŒQw xY w)
NÚmarkerszslow: 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 platformsr   z.timeout: mark a test for a non-default timeout)Úparse_durationz8fail_slow: mark a test for a non-default timeout failurez‘skip_xp_backends(*backends, reasons=None, np_only=False, cpu_only=False): mark the desired skip configuration for the `skip_xp_backends` fixture.)Úaddinivalue_lineÚpytest_timeoutÚ	ExceptionÚpytest_fail_slowr   )Úconfigr   r   s      úRC:\Crop_Prediction\Backend\crop-ai-system\venv\Lib\site-packages\scipy/conftest.pyÚpytest_configurer      s¹   € Ø
×Ñ˜IØ)ô+à
×Ñ˜IØRôTà
×Ñ˜IØBôDðIÛðSõ 	4ð ×Ñ˜Ið	RõSøô ò IØ×ÑØÐGö	IðIûô ò SØ×ÑØÐQö	SðSús"   ¸A ½A7 ÁA4Á3A4Á7BÂBc                 ón  — | j                  d«      }|�A	 t        t        j                  j	                  dd«      «      }|st        j                  d«       | j                  d«      }|�Gt        j                  d«      j                  dk  r%t        j                  d	|j                  d   › �«       t        j                  «       5 }|j                  t        j                   «       	 dd
lm} d}|rc	 t        t        j                  d   «      }t        j*                  d«      s1t        j,                  «       dz  }t/        ||z  d«      }	  |d¬«       d d d «       y # t
        $ r d}Y �Œ*w xY w# t&        $ r d}Y Œ�w xY w# t(        $ r Y d d d «       y w xY w# t&        $ r Y d d d «       y w xY w# 1 sw Y   y xY w)NÚ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): )Úthreadpool_limitsTÚPYTEST_XDIST_WORKER_COUNTÚOMP_NUM_THREADSé   é   Úblas)Úuser_api)Úget_closest_markerÚintÚosÚenvironÚgetÚ
ValueErrorÚpytestÚskipÚnpÚintpÚitemsizeÚxfailÚargsÚnptÚsuppress_warningsÚfilterÚ PytestUnraisableExceptionWarningÚthreadpoolctlr   r   ÚKeyErrorÚgetenvÚ	cpu_countÚmax)	ÚitemÚmarkÚvÚsupr   ÚHAS_THREADPOOLCTLÚxdist_worker_countÚmax_openmp_threadsÚthreads_per_workers	            r   Úpytest_runtest_setupr?   1   s¬  € Ø×"Ñ" 7Ó+€DØÐð	Ü”B—J‘J—N‘N =°#Ó6Ó7ˆAñ Ü�K‰Kð Kô Là×"Ñ"Ð#3Ó4€DØÐœBŸG™G A›J×/Ñ/°!Ò3Ü�‰Ð=¸d¿i¹iÈ¹l¸^ÐLÔMô 
×	Ñ	Ó	 ð  CØ�
‰
”6×:Ñ:Ô;ð	&Ý7à $Ðñ
 ð
Ü%(¬¯©Ð4OÑ)PÓ%QÐ"ô
 —9‘9Ð.Ô/Ü%'§\¡\£^°qÑ%8Ð"Ü%(Ð);Ð?QÑ)QÐSTÓ%UÐ"ðÙ%Ð&8À6ÕJ÷5ð øô ò 	Ø‹Að	ûô$ ò 	&à %Òð	&ûô ò à÷)ð ð$ûô !ò ð ÷=ð ð6ú÷7ð úsƒ   •)E Ã F+Ã$E,Ã,F+Ã/E=Ä;F+Å
FÅE)Å(E)Å,E:Å7F+Å9E:Å:F+Å=	FÆF+ÆFÆF+Æ	F(ÆF+Æ'F(Æ(F+Æ+F4Úfunction)ÚscopeÚautousec              #   ó’   K  — t        «       }d–— t        «       }||k7  r&t        j                  d|d›d|d›d�t        d¬«       yy­w)z9
    Check FPU mode was not changed during the test.
    NzFPU mode changed from z#xz to z during the testr   )ÚcategoryÚ
stacklevel)r   ÚwarningsÚwarnr   )ÚrequestÚold_modeÚnew_modes      r   Úcheck_fpu_moderK   b   sT   è ø€ ô
 ‹~€HÛ	Ü‹~€Hà�8ÒÜ�‰Ð.¨x¸¨m¸4ÀÈ¸}ð M!ð !ä3Àö	Cð ùs   ‚AAÚnumpyÚarray_api_strictz2.0z'array-api-strict must be >= version 2.0z2023.12)Úapi_versionÚpytorchÚcupyú	jax.numpyÚjax_enable_x64Újax_default_device)Ú1ÚtrueÚallz!'--array-api-backend' must be in ÚcudaÚxpzsTest involves masked arrays, object arrays, or other types that are not valid input when `SCIPY_ARRAY_API` is used.©Úreasonc                 óÀ  — d|j                   vry|j                   d   j                  }|j                   d   j                  }|j                  dd«      }|j                  dd«      }|r>|j                  ddg«      }|d   }| j                  d	k7  rt        j                  |¬
«       y|rÜd}t        rÔt        dk7  rË| j                  dk(  rt        j                  |¬
«       n¥| j                  dk(  r>d| j                  d«      j                  j                  vrot        j                  |¬
«       nX| j                  dk(  rI| j                  d«      j                  «       D ]'  }d|j                  vsŒt        j                  |¬
«       Œ) |�Y|j                  dd«      }t        |«      D ]8  \  }	}
| j                  |
k(  sŒ|sd|
› �}n||	   }t        j                  |¬
«       Œ: yy)aî  
    Skip based on the ``skip_xp_backends`` marker.

    Parameters
    ----------
    *backends : tuple
        Backends to skip, e.g. ``("array_api_strict", "torch")``.
        These are overriden when ``np_only`` is ``True``, and are not
        necessary to provide for non-CPU backends when ``cpu_only`` is ``True``.
    reasons : list, optional
        A list of reasons for each skip. When ``np_only`` is ``True``,
        this should be a singleton list. Otherwise, this should be a list
        of reasons, one for each corresponding backend in ``backends``.
        If unprovided, default reasons are used. Note that it is not possible
        to specify a custom reason with ``cpu_only``. Default: ``None``.
    np_only : bool, optional
        When ``True``, the test is skipped for all backends other
        than the default NumPy backend. There is no need to provide
        any ``backends`` in this case. To specify a reason, pass a
        singleton list to ``reasons``. Default: ``False``.
    cpu_only : bool, optional
        When ``True``, the test is skipped on non-CPU devices.
        There is no need to provide any ``backends`` in this case,
        but any ``backends`` will also be skipped on the CPU.
        Default: ``False``.
    Úskip_xp_backendsNÚnp_onlyFÚcpu_onlyÚreasonsz#do not run with non-NumPy backends.r   rL   rY   z4do not run with `SCIPY_ARRAY_API` set and not on CPUÚcpurP   ÚtorchrQ   z#do not run with array API backend: )Úkeywordsr-   Úkwargsr%   Ú__name__r'   r(   r   r   ÚemptyÚdeviceÚtypeÚdevicesÚdevice_kindÚ	enumerate)rX   rH   Úbackendsrc   r]   r^   r_   rZ   ÚdÚiÚbackends              r   r\   r\   ²   s¥  € ð8  ×!1Ñ!1Ñ1ØØ×ÑÐ 2Ñ3×8Ñ8€HØ×ÑÐ0Ñ1×8Ñ8€FØ�j‰j˜ EÓ*€GØ�z‰z˜* eÓ,€HÙØ—*‘*˜YÐ)NÐ(OÓPˆØ˜‘ˆØ�;‰;˜'Ò!Ü�K‰K˜vÕ&ØÙØGˆÝœ|¨uÒ4Ø�{‰{˜fÒ$Ü—‘ 6Ö*Ø—‘ Ò'Ø §¡¨£× 2Ñ 2× 7Ñ 7Ñ7Ü—K‘K vÖ.Ø—‘ Ò+ØŸ™ !›×,Ñ,Ó.ò 3�AØ A§M¡MÒ1ÜŸ™¨6Ö2ð3ð ÐØ—*‘*˜Y¨Ó.ˆÜ# HÓ-ò 	+‰JˆAˆwØ�{‰{˜gÓ%ÙØBÀ7À)ÐL‘Fà$ Q™Z�FÜ—‘ 6Ö*ñ	+ð ó    z.hypothesisÚnondeterministic)ÚnameÚdeadlineÚ
print_blobÚdeterministic)rq   rr   rs   ÚdatabaseÚderandomizeÚsuppress_health_checkÚSCIPY_HYPOTHESIS_PROFILEc              #   ó~  K  — t        «       }ddg}|D ]  }t        t        d¬«      ||<   Œ g d¢}|D ]  }t        t        ¬«      ||<   Œ ddlm} d	d
g}|D ]  }t        |j
                  d¬«      ||<   Œ g d¢}|D ]  }t        t        ¬«      ||<   Œ t        t        d¬«      t        dt        ¬«      t        d|j
                  ¬«      dœ}|j                  |«       t        d«      }	ddl
m}
 ddl} |
«       5  |j                  j                  d«       t        j                   «       5  | r5| j"                  |v r't        j$                  di || j"                     ¤Ž d–— n3| r| j"                  |	v rd–— nt        j&                  dt(        «       d–— ddd«       ddd«       y# 1 sw Y   ŒxY w# 1 sw Y   yxY w­w)zmTemporarily turn (almost) all warnings to errors.

        Filter out known warnings which we allow.
        zscipy.linalg.normzscipy.ndimage.center_of_masszdivide by zero)rD   Úmessage)zscipy.signal.cwtzscipy.signal.morletzscipy.signal.morlet2zscipy.signal.rickerzscipy.integrate.simpsonzscipy.interpolate.interp2d)rD   r   )Ú	integratezscipy.special.ellip_normalzscipy.special.ellip_harm_2zThe occurrence of roundoff)zscipy.stats.anderson_ksampzscipy.stats.kurtosistestzscipy.stats.normaltestúscipy.sparse.linalg.normzExited at iterationzthe matrix subclass is not)rz   rD   z"The maximum number of subdivisions)r|   z
linalg.rstz	stats.rstúscipy.signal.normalize)Ú_fixed_default_rngNÚerror)Úignore)ÚdictÚRuntimeWarningÚDeprecationWarningÚscipyr{   ÚIntegrationWarningÚUserWarningÚPendingDeprecationWarningÚupdateÚsetÚscipy._lib._utilr~   rL   ÚrandomÚseedrF   Úcatch_warningsrq   ÚfilterwarningsÚsimplefilterÚWarning)ÚtestÚknown_warningsÚdivide_by_zerorq   Ú
deprecatedr{   Úintegration_wÚuser_wÚdctÚlegitr~   r)   s               r   Úwarnings_errors_and_rngr™     sÛ  è ø€ ô ›ˆð  Ð!?ð
ˆð #ò 	BˆDÜ#'´Ø0@ô$BˆN˜4Ò ð	Bò

ˆ
ð ò 	EˆDÜ#'Ô1CÔ#DˆN˜4Ò ð	Eõ 	$à5Ø5ð
ˆð "ò 	NˆDÜ#'°×1MÑ1MØ0Lô$NˆN˜4Ò ð	Nò
Hˆàò 	>ˆDÜ#'´Ô#=ˆN˜4Ò ð	>ô œkÐ3HÔIô Ð9Ü7ô9ô ÐAØ'×:Ñ:ô<ñ

ˆð 	×Ñ˜cÔ"ô Ð,Ó-ˆõ 	8ÛÙÓ!ñ 	Ø�I‰I�N‰N˜4Ô Ü×(Ñ(Ó*ñ 	Ù˜DŸI™I¨Ñ7Ü×+Ñ+ñ IØ.<¸T¿Y¹YÑ.GòIäÙ˜dŸi™i¨5Ñ0Üä×)Ñ)¨'´7Ô;Û÷	÷	ð 	÷	ð 	ú÷	ð 	üs7   ‚C7F=Ã90F1Ä)A+F%ÆF1Æ	F=Æ%F.	Æ*F1Æ1F:Æ6F=)zscipy.linalg.LinAlgErrorzscipy.fftpack.fftshiftzscipy.fftpack.ifftshiftzscipy.fftpack.fftfreqzscipy.special.sinczscipy.optimize.show_optionsr}   r|   Ú2)zscipy.io.hb_readzscipy.io.hb_writez)scipy.sparse.csgraph.connected_componentsz&scipy.sparse.csgraph.depth_first_orderz"scipy.sparse.csgraph.shortest_pathz#scipy.sparse.csgraph.floyd_warshallzscipy.sparse.csgraph.dijkstraz!scipy.sparse.csgraph.bellman_fordzscipy.sparse.csgraph.johnsonzscipy.sparse.csgraph.yenz(scipy.sparse.csgraph.breadth_first_orderz*scipy.sparse.csgraph.reverse_cuthill_mckeez$scipy.sparse.csgraph.structural_rankz*scipy.sparse.csgraph.construct_dist_matrixz%scipy.sparse.csgraph.reconstruct_pathzscipy.ndimage.value_indiceszscipy.stats.mstats.describe)zscipy.stats.distributionszscipy.optimize.cython_optimizez
scipy.testzscipy.show_configÚ zReST parser limitationz__cinit__ unexpected argumentznan in scalar_powerzintegration warning)úio.rstzND_regular_grid.rstzextrapolation_examples.rstzsampling_pinv.rstzsampling_srou.rstzprobability_distributions.rstzintegrate.nquad(func,rœ   zoctave_a.mat)N)RÚjsonr#   rF   ÚtempfileÚ
contextlibr   rL   r)   Únumpy.testingÚtestingr.   r'   Ú
hypothesisÚscipy._lib._fpumoder   Úscipy._lib._testutilsr   Úscipy._lib._array_apir   r   Ú
scipy._libr   Úscipy_doctest.conftestr	   Ú
HAVE_SCPDTÚModuleNotFoundErrorr   r?   ÚfixturerK   Úxp_available_backendsÚ
isinstanceÚstrrM   rˆ   ÚparseÚ__version__ÚVersionÚImportErrorÚset_array_api_strict_flagsra   Úset_default_devicerP   Ú	jax.numpyÚjaxr   rh   ÚlowerÚloadsÚSCIPY_ARRAY_API_r3   ÚkeysÚmsgr&   r8   ÚparametrizeÚvaluesÚarray_api_compatibleÚskipifÚskip_xp_invalid_argr\   ÚconfigurationÚset_hypothesis_home_dirÚpathÚjoinÚ
gettempdirÚsettingsÚregister_profileÚlistÚHealthCheckr$   r%   rx   Úload_profiler™   Úuser_context_mgrr‰   ÚskiplistÚpytest_extra_ignoreÚpytest_extra_xfailÚ
pseudocodeÚlocal_resources)rn   s   0r   ú<module>rÐ      sV  ðã Û 	Û Û Ý %ã Ý Û Û å ,Ý 6ß ?Ý ðÝ0Ø€Jò
Sò0.ðb €‡��j¨$Ô/ñCó 0ðCð ! "˜Ð â‘z /°3Õ7ð	ÛØ×$Ñ$Ð&8Ð:JÐ%KÔLØˆ7�=‰=Ð)×5Ñ5Ó6¸¸¿¹ÈÓ9OÒOÙÐGÓHÐHØ3Ð×3Ñ3Ø!õ	
ðÛØ×$Ñ$ i°Ð%7Ô8à ˆ× Ñ  Ô.ðÛØ×$Ñ$ f¨d ^Ô4ðÛØ×$Ñ$ k°3·9±9Ð%=Ô>Ø�
‰
×ÑÐ*¨DÔ1Ø�
‰
×ÑÐ.°°·±¸LÓ0IÈ!Ñ0LÔMð
 €×ÑÓ mÑ3Ø%˜4Ÿ:™: oÓ6ÐàÐ$Ñ$Øð&ð $4ö)àð Ð2°7Ñ;Ñ;ò)Ð%ð 
Ð"Ñ"Ø€Là—{‘{×.Ñ.¨tÐ5J×5QÑ5QÓ5SÓTÐ à—k‘k×(Ñ(¨ðIð )ó KÐ ð
 ‡�ñ<+ó ð<+ðD × Ñ × 0Ñ 0Ø‡G�G‡L�LÐ$�×$Ñ$Ó&¨Ó6ôð × Ñ × $Ñ $Ø	 d°tð %ô ð × Ñ × $Ñ $Ø	Ø˜d¨T¸tÙ˜z×5Ñ5Ó6ð %ô ð Ÿ:™:Ÿ>™>Ð*DØ*9ó;Ð à 
× Ñ ×  Ñ  Ð!9Ô :ñ ð òNó ðNðb "9€IÔÙò 	ó 	€IÔð 
‡~�~˜ÒØ×Ñ×!Ñ!¡#ò 'ó #ô 	ò,%€IÔ!ð Ø7Ø&>Ø<Ø2Ø)>ñ$€IÔ ñ Ð 7Ð8Ó9€IÔØ!)¨NÐ+;Ð <€IÕðY øðw ò ØƒJðûðR ò Úðûð ò Úðûð ò Úðûð ò Úðüò)øð ò &Ø9Ð:O×:TÑ:TÓ:VÐ9WÐX�Ù  “oÐ%ð&úsz   ÁM: Á>A!N Ã )N Ä
N  Ä"A,N, Æ9N= Æ=N8Ç
N= Í:NÎNÎNÎNÎNÎNÎ N)Î(N)Î,N5Î4N5Î8N= Î=!O