ó
    Eñiw  ã                   ó°  • % S r SSKrSSKrSSKJr  SSKJr  SSKJrJ	r	  SSK
rSSKJr  SSKJr  SSKJs  Js  J
r  SSKJrJr  SSKJr  \r\	\S	'   \\R4                  -  r\	\S
'   \R6                  R9                  SS5      r\\-  \S'   \R6                  R9                  SS5      r  " S S\RB                  5      r"\" S5      S\#S\"4S j5       r$S\S\4S jr%g)z|
Override functions from array_api_compat, for use by array-api-extra
and internally.

See also _array_api_compat_vendor.py
é    N)Ú	lru_cache)Ú
ModuleType)ÚAnyÚ	TypeAlias)Úarray_api_compat)Úis_array_api_objÚis_jax_array)Ú	SparseABCÚArrayÚ	ArrayLikeÚSCIPY_ARRAY_APIFÚSCIPY_DEVICEÚcpuc                   ó$   • \ rS rSrSrSrSrSrSrg)Ú_ArrayClsInfoé    r   é   é   é   © N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ÚskipÚnumpyÚ
array_likeÚunknownÚ__static_attributes__r   ó    Ú[/home/mande/repo/quber/.venv/lib/python3.13/site-packages/scipy/_lib/_array_api_override.pyr   r       s   † Ø€DØ€EØ€JØƒGr    r   éd   ÚclsÚreturnc           
      ót  • [        U [        [        45      (       a  [        R                  $ [        U [
        5      (       a  Sn[        U5      e[        U [        R                  R                  5      (       a  [        S5      e[        U [        R                  5      (       a  [        S5      e[        U [        R                  [        R                  45      (       a  [        R                  $ [        U [        [         ["        [$        ['        S 5      45      (       a  [        R(                  $ [        R*                  $ )Nz�Sparse arrays/matrices are not supported by this function. Perhaps one of the `scipy.sparse.linalg` functions would work instead.z8Inputs of type `numpy.ma.MaskedArray` are not supported.z0Inputs of type `numpy.matrix` are not supported.)Ú
issubclassÚlistÚtupler   r   r
   Ú
ValueErrorÚnpÚmaÚMaskedArrayÚ	TypeErrorÚmatrixÚndarrayÚgenericr   ÚintÚfloatÚcomplexÚboolÚtyper   r   )r#   Úmsgs     r!   Ú_validate_array_clsr7   '   sÝ   € ä�#œœu�~×&Ñ&Ü×'Ñ'Ð'ô �#”y×!Ñ!ð&ˆô ˜‹oÐä�#”r—u‘u×(Ñ(×)Ñ)ÜÐRÓSÐSä�#”r—y‘y×!Ñ!ÜÐJÓKÐKä�#œŸ
™
¤B§J¡JÐ/×0Ñ0Ü×"Ñ"Ð"ô
 �#œœU¤G¬T´4¸³:Ð>×?Ñ?Ü×!Ñ!Ð!ä× Ñ Ð r    Úarraysc                  ób  • [         (       d  [        $ / n/ nU  GHV  n[        [        U5      5      nU[        R
                  L a  M-  U[        R                  L a„  UR                  R                  S;   a  UR                  U5        Mm  UR                  R                  S:X  a#  [        U5      (       a  UR                  U5        Mª  [        SUR                  < S35      eU[        R                  L a#  [        U5      (       a  UR                  U5        Mú   [        R                  " U5      nUR                  R                  S;  a  [        SUR                  < S35      eUR                  U5        GMY     U(       d  [        $ [         R"                  " / UQUQ76 $ ! [         a    [        S5      ef = f)a  Get the array API compatible namespace for the arrays xs.

Parameters
----------
*arrays : sequence of array_like
    Arrays used to infer the common namespace.

Returns
-------
namespace : module
    Common namespace.

Notes
-----
Wrapper around `array_api_compat.array_namespace`.

1. Check for the global switch `SCIPY_ARRAY_API`. If disabled, just
   return array_api_compat.numpy namespace and skip all compliance checks.

2. Check for known-bad array classes.
   The following subclasses are not supported and raise and error:

   - `numpy.ma.MaskedArray`
   - `numpy.matrix`
   - NumPy arrays which do not have a boolean or numerical dtype
   - `scipy.sparse` arrays

3. Coerce array-likes to NumPy arrays and check their dtype.
   Note that non-scalar array-likes can't be mixed with non-NumPy Array
   API objects; e.g.

   - `array_namespace([1, 2])` returns NumPy namespace;
   - `array_namespace(np.asarray([1, 2], [3, 4])` returns NumPy namespace;
   - `array_namespace(cp.asarray([1, 2], [3, 4])` raises an error.
ÚiufcbÚVzAn argument has dtype `z3`; only boolean and numerical dtypes are supported.zCAn argument is neither array API compatible nor coercible by NumPy.)r   Ú	np_compatr7   r5   r   r   r   ÚdtypeÚkindÚappendr	   r-   r   r   r*   Ú
asanyarrayr   Úarray_namespace)r8   Únumpy_arraysÚ
api_arraysÚarrayÚarr_infos        r!   rA   rA   E   s“  € ÷H Š?äÐà€LØ€JäˆÜ&¤t¨E£{Ó3ˆØ”}×)Ñ)Ò)Ùàœ×,Ñ,Ò,Ø�{‰{×Ñ 7Ó*Ø×#Ñ# EÖ*Ø—‘×!Ñ! SÓ(¬\¸%×-@Ñ-@ð ×!Ñ! %Ö(äÐ"9¸%¿+¹+¹ð ISð !Só Tð Tð œ×.Ñ.Ò.Ô3CÀE×3JÑ3JØ×Ñ˜eÖ$ð7ÜŸš eÓ,�ð �{‰{×Ñ wÓ.ÜÐ"9¸%¿+¹+¹ð ISð !Só Tð Tà×Ñ ×&ñ; öB ÜÐô ×+Ò+ÐG¨\ÐG¸JÒGÐGøô ó 7Üð !6ó 7ð 7ð7ús   ÄFÆF.)&Ú__doc__ÚenumÚosÚ	functoolsr   Útypesr   Útypingr   r   r   r*   Únumpy.typingÚnptÚ
scipy._libr   Ú!scipy._lib.array_api_compat.numpyÚ_libr<   Úscipy._lib.array_api_compatr   r	   Úscipy._lib._sparser
   r   Ú__annotations__r   ÚenvironÚgetr   Ústrr4   r   ÚEnumr   r5   r7   rA   r   r    r!   Ú<module>rX      sÒ   ðòó Û 	å Ý ß !ã Ý å 'ß 5Ó 5ß FÝ (ð €€yÓ Ø˜sŸ}™}Ñ,€	ˆ9Ó ,ð !Ÿj™jŸn™nÐ->ÀÓF€��t‘Ó Fà�z‰z�~‰~˜n¨eÓ4€ô�D—I‘Iô ñ ˆ3ƒð!˜Tð ! mó !ó ð!ð:QH˜Uð QH zõ QHr    