403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/scipy/fft/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/scipy/fft/__pycache__/_backend.cpython-311.pyc
�

d�c����ddlmcmZddlmZddlmZGd�d��ZdeiZd�Z	dd
�Z
d�Zdd�Zd
�Z
e
dd���dS)�N�)�_fftlog)�
_pocketfftc�,�eZdZdZdZed���ZdS)�
_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��tt|jd��}|�tt|jd��}|�tS||i|��S)N)�getattrr�__name__r�NotImplemented)�method�args�kwargs�fns    �4/usr/lib/python3/dist-packages/scipy/fft/_backend.py�__ua_function__z_ScipyBackend.__ua_function__sO���Z���$�
7�
7��
�:���&�/�4�8�8�B�
�:�!�!��r�4�"�6�"�"�"�N)r�
__module__�__qualname__�__doc__�
__ua_domain__�staticmethodr�rrrrs>��������&�M��#�#��\�#�#�#rr�scipyc���t|t��rD	t|}n5#t$r(}t	d�|����|�d}~wwxYw|jdkrt	d���|S)z8Maps strings to known backends and validates the backendzUnknown backend {}Nrz,Backend does not implement "numpy.scipy.fft")�
isinstance�str�_named_backends�KeyError�
ValueError�formatr)�backend�es  r�_backend_from_argr$!s����'�3���J�	J�%�g�.�G�G���	J�	J�	J��1�8�8��A�A�B�B��I�����	J������ 1�1�1��G�H�H�H��Ns�
%�
A�#A�AFc�T�t|��}tj||||���dS)a7Sets 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. "scipy" is the default backend.
    >>> fft([1])  # Calls the global backend
    array([1.+0.j])
    )�coerce�only�try_lastN)r$�ua�set_global_backend)r"r&r'r(s    rr*r*0s2��P ��(�(�G���'�&�t�h�O�O�O�O�O�Orc�L�t|��}tj|��dS)az
    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
    >>> fft([1])  # The registered backend is called because the global backend returns `NotImplemented`
    array([1.+0.j])
    >>> set_global_backend("scipy")  # Restore global backend to default

    N)r$r)�register_backend�r"s rr,r,\s)��D ��(�(�G���� � � � � rc�N�t|��}tj|||���S)aOContext 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   rr/r/�s(��8 ��(�(�G�
�>�'�&�t�<�<�<�<rc�H�t|��}tj|��S)a�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_backendr-s rr1r1�s!��2 ��(�(�G�
�?�7�#�#�#rT)r()FFF)FF)�scipy._lib.uarray�_lib�uarrayr)�rrrrr$r*r,r/r1rrr�<module>r6s������������������������#�#�#�#�#�#�#�#�.�]���
���)P�)P�)P�)P�X#!�#!�#!�L=�=�=�=�@$�$�$�:��7�T�*�*�*�*�*�*r

Youez - 2016 - github.com/yon3zu
LinuXploit