+
    LV-jR  ã                   óþ   € ^ RI Hu Ht ^ RIHt ^RIHt ^RIHt ^RIH	t	  ! R R4      t
R]
/tR	 t]! R
R7      RR l4       t]! R
R7      R 4       t]! R
R7      RR l4       t]! R
R7      R 4       t]! RR
R7       R# )é    N)Úxp_capabilities)Ú_basic_backend)Ú_realtransforms_backend)Ú_fftlog_backendc                   ó8   a € ] tR t^t o RtRt]R 4       tRtV t	R# )Ú_ScipyBackenda  The default backend for fft calculations

Notes
-----
We use the domain ``numpy.scipy`` rather than ``scipy`` because ``uarray``
treats the domain as a hierarchy. This means the user can install a single
backend for ``numpy`` and have it implement ``numpy.scipy.fft`` as well.
únumpy.scipy.fftc                óØ   € \        \        V P                  R 4      pVf   \        \        V P                  R 4      pVf   \        \        V P                  R 4      pVf   \
        # V! V/ VB # )N)Úgetattrr   Ú__name__r   r   ÚNotImplemented)ÚmethodÚargsÚkwargsÚfns   &&& Úc/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/scipy/fft/_backend.pyÚ__ua_function__Ú_ScipyBackend.__ua_function__   s`   € ô ”^ V§_¡_°dÓ;ˆØŠ:ÜÔ0°&·/±/À4ÓHˆBØŠ:Üœ¨&¯/©/¸4Ó@ˆBØŠ:Ü!Ð!Ù�4Ð"˜6Ñ"Ð"ó    © N)
r   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__ua_domain__Ústaticmethodr   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s#   ø‡ € ñð &€Màñ	#ó ö	#r   r   Úscipyc                óÊ   € \        V \        4      '       d    \        V ,          p V P
                  R8w  d   \	        R4      hV #   \         d   p\	        RT  24      ThRp?ii ; i)z8Maps strings to known backends and validates the backendzUnknown backend Nr	   z,Backend does not implement "numpy.scipy.fft")Ú
isinstanceÚstrÚ_named_backendsÚKeyErrorÚ
ValueErrorr   )ÚbackendÚes   & r   Ú_backend_from_argr)   %   sl   € ô �'œ3×Òð	BÜ% gÕ.ˆGð ×ÑÐ 1Ô1ÜÐGÓHÐHà€Nøô ô 	BÜÐ/°¨yÐ9Ó:ÀÐAûð	Bús   ˜A ÁA"ÁAÁA"T)Úout_of_scopec                óL   € \        V 4      p \        P                  ! WW#R7       R# )a¬  Sets the global fft backend

This utility method replaces the default backend for permanent use. It
will be tried in the list of backends automatically, unless the
``only`` flag is set on a backend. This will be the first tried
backend outside the :obj:`set_backend` context manager.

Parameters
----------
backend : {object, 'scipy'}
    The backend to use.
    Can either be a ``str`` containing the name of a known backend
    {'scipy'} or an object that implements the uarray protocol.
coerce : bool
    Whether to coerce input types when trying this backend.
only : bool
    If ``True``, no more backends will be tried if this fails.
    Implied by ``coerce=True``.
try_last : bool
    If ``True``, the global backend is tried after registered backends.

Raises
------
ValueError: If the backend does not implement ``numpy.scipy.fft``.

Notes
-----
This will overwrite the previously set global backend, which, by default, is
the SciPy implementation.

Examples
--------
We can set the global fft backend:

>>> from scipy.fft import fft, set_global_backend
>>> set_global_backend("scipy")  # Sets global backend (default is "scipy").
>>> fft([1])  # Calls the global backend
array([1.+0.j])
)ÚcoerceÚonlyÚtry_lastN)r)   ÚuaÚset_global_backend)r'   r,   r-   r.   s   &&&&r   r0   r0   4   s   € ôR   Ó(€GÜ×Ò˜'°t×Or   c                óH   € \        V 4      p \        P                  ! V 4       R# )a  
Register a backend for permanent use.

Registered backends have the lowest priority and will be tried after the
global backend.

Parameters
----------
backend : {object, 'scipy'}
    The backend to use.
    Can either be a ``str`` containing the name of a known backend
    {'scipy'} or an object that implements the uarray protocol.

Raises
------
ValueError: If the backend does not implement ``numpy.scipy.fft``.

Examples
--------
We can register a new fft backend:

>>> from scipy.fft import fft, register_backend, set_global_backend
>>> class NoopBackend:  # Define an invalid Backend
...     __ua_domain__ = "numpy.scipy.fft"
...     def __ua_function__(self, func, args, kwargs):
...          return NotImplemented
>>> set_global_backend(NoopBackend())  # Set the invalid backend as global
>>> register_backend("scipy")  # Register a new backend
# The registered backend is called because
# the global backend returns `NotImplemented`
>>> fft([1])
array([1.+0.j])
>>> set_global_backend("scipy")  # Restore global backend to default

N)r)   r/   Úregister_backend©r'   s   &r   r2   r2   a   s   € ôJ   Ó(€GÜ×Ò˜Ö r   c                óH   € \        V 4      p \        P                  ! WVR7      # )aó  Context manager to set the backend within a fixed scope.

Upon entering the ``with`` statement, the given backend will be added to
the list of available backends with the highest priority. Upon exit, the
backend is reset to the state before entering the scope.

Parameters
----------
backend : {object, 'scipy'}
    The backend to use.
    Can either be a ``str`` containing the name of a known backend
    {'scipy'} or an object that implements the uarray protocol.
coerce : bool, optional
    Whether to allow expensive conversions for the ``x`` parameter. e.g.,
    copying a NumPy array to the GPU for a CuPy backend. Implies ``only``.
only : bool, optional
    If only is ``True`` and this backend returns ``NotImplemented``, then a
    BackendNotImplemented error will be raised immediately. Ignoring any
    lower priority backends.

Examples
--------
>>> import scipy.fft as fft
>>> with fft.set_backend('scipy', only=True):
...     fft.fft([1])  # Always calls the scipy implementation
array([1.+0.j])
)r,   r-   )r)   r/   Úset_backend)r'   r,   r-   s   &&&r   r5   r5   Š   s   € ô:   Ó(€GÜ�>Š>˜'°tÔ<Ð<r   c                óD   € \        V 4      p \        P                  ! V 4      # )aB  Context manager to skip a backend within a fixed scope.

Within the context of a ``with`` statement, the given backend will not be
called. This covers backends registered both locally and globally. Upon
exit, the backend will again be considered.

Parameters
----------
backend : {object, 'scipy'}
    The backend to skip.
    Can either be a ``str`` containing the name of a known backend
    {'scipy'} or an object that implements the uarray protocol.

Examples
--------
>>> import scipy.fft as fft
>>> fft.fft([1])  # Calls default SciPy backend
array([1.+0.j])
>>> with fft.skip_backend('scipy'):  # We explicitly skip the SciPy backend
...     fft.fft([1])                 # leaving no implementation available
Traceback (most recent call last):
    ...
BackendNotImplementedError: No selected backends had an implementation ...
)r)   r/   Úskip_backendr3   s   &r   r7   r7   «   s   € ô4   Ó(€GÜ�?Š?˜7Ó#Ð#r   )r.   )FFF)FF)Úscipy._lib.uarrayÚ_libÚuarrayr/   Úscipy._lib._array_apir   Ú r   r   r   r   r$   r)   r0   r2   r5   r7   r   r   r   Ú<module>r=      s©   ðß Ð Ý 1Ý Ý %Ý ÷#ñ #ð2 ˆ]ð€ò
ñ ˜dÔ#ó)Pó $ð)PñX ˜dÔ#ñ%!ó $ð%!ñP ˜dÔ#ó=ó $ð=ñ@ ˜dÔ#ñ$ó $ð$ñ: �7 T× *r   