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 :  /usr/lib/python3/dist-packages/scipy/fft/_pocketfft/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

d�c]����ddlmZddlZddlZddlZddlZddlZddlm	Z	ej
��Zej��Z
dd�Zd�Zd�Zd�Zd	�Zd
�Zddddd�Zd
�Zd�Zejd���Zd�ZdS)�)�NumberN�)�	good_sizec���t|t��r|f}	d�|D��}n9#t$r,}|pd}td�|����|�d}~wwxYw|S)aConvert ``x`` to an iterable sequence of int

    Parameters
    ----------
    x : value, or sequence of values, convertible to int
    name : str, optional
        Name of the argument being converted, only used in the error message

    Returns
    -------
    y : ``List[int]``
    c�6�g|]}tj|����S�)�operator�index)�.0�as  �=/usr/lib/python3/dist-packages/scipy/fft/_pocketfft/helper.py�
<listcomp>z$_iterable_of_int.<locals>.<listcomp> s"��*�*�*�1�X�^�A�
�
�*�*�*��valuez+{} must be a scalar or iterable of integersN)�
isinstancer�	TypeError�
ValueError�format)�x�name�es   r
�_iterable_of_intrs����!�V����
�D��/�*�*��*�*�*�����/�/�/���w���F� �&��,�,�(�(�-.�	/�����/����

�Hs�'�
A�'A�Ac�v��|du}|du}|s�t|d��}�fd�|D��}t�fd�|D����rtd���tt	|����t|��krtd���|s�t|d��}|r/t|��t|��krtd���|rQt|���jkrtd	���t
�jt|��z
�j��}�fd
�t||��D��}n9|r)t�j	��}t
�j��}n�fd�|D��}td�|D����r"td
�
|�����||fS)z2Handles shape and axes arguments for nd transformsN�axesc�4��g|]}|dkr
|�jzn|��S)r��ndim�rrrs  �r
rz+_init_nd_shape_and_axes.<locals>.<listcomp>0s+���9�9�9�q�a�!�e�e��A�F�
�
��9�9�9rc3�:�K�|]}|�jkp|dkV��dS)rNrrs  �r
�	<genexpr>z*_init_nd_shape_and_axes.<locals>.<genexpr>2s2�����2�2��q�A�F�{�#�a�!�e�2�2�2�2�2�2rz$axes exceeds dimensionality of inputzall axes must be unique�shapezBwhen given, axes and shape arguments have to be of the same lengthz)shape requires more axes than are presentc�@��g|]\}}|dkr
�j|n|��S)����r!)r�srrs   �r
rz+_init_nd_shape_and_axes.<locals>.<listcomp>Bs/���K�K�K�$�!�Q�q�B�w�w������A�K�K�Krc�*��g|]}�j|��Srr$rs  �r
rz+_init_nd_shape_and_axes.<locals>.<listcomp>Gs���*�*�*������*�*�*rc3�"K�|]
}|dkV��dS)rNr)rr%s  r
r z*_init_nd_shape_and_axes.<locals>.<genexpr>Is&����
 �
 �Q�1�q�5�
 �
 �
 �
 �
 �
 r�-invalid number of data points ({0}) specified)r�anyr�len�setr�range�zip�listr!r)rr!r�noshape�noaxess`    r
�_init_nd_shape_and_axesr1)s�����t�m�G�
�T�\�F��8���f�-�-��9�9�9�9�D�9�9�9���2�2�2�2�T�2�2�2�2�2�	E��C�D�D�D��s�4�y�y�>�>�S��Y�Y�&�&��6�7�7�7��+� ���0�0���	?�C��I�I��U���+�+��>�?�?�
?��	6��5�z�z�A�F�"�"� �!L�M�M�M����#�e�*�*�,�a�f�5�5�D�K�K�K�K�#�e�T�:J�:J�K�K�K���	�+��Q�W�
�
���Q�V�}�}���*�*�*�*�T�*�*�*��
�
 �
 �%�
 �
 �
 � � �K��;�B�B�5�I�I�K�K�	K��$�;�rc��t|d��stj|��}|jtjkrtj|tj��S|jjdvrtj|tj��S|j�d��}|j	d}tj
|||���S)zl
    Convert to array with floating or complex dtype.

    float16 values are also promoted to float32.
    �dtype�fc�=�ALIGNED)r3�copy)�hasattr�np�asarrayr3�float16�float32�kind�float64�newbyteorder�flags�array)rr3r7s   r
�	_asfarrayrBPs����1�g�����J�q�M�M���w�"�*����z�!�R�Z�(�(�(�	
���T�	!�	!��z�!�R�Z�(�(�(�
�G� � ��%�%�E��w�y�!�!�D�
�8�A�U��.�.�.�.rc�x�||urdSt|tj��st|d��rdS|jduS)z|
    Strict check for `arr` not sharing any data with `original`,
    under the assumption that arr = asarray(original)
    F�	__array__N)rr9�ndarrayr8�base)�arr�originals  r
�_datacopiedrIdsI��
�h����u��h��
�+�+����+�0N�0N���u��8�t��rc���d}td��g|jz}t||��D]J\}}|j||krtd|��||<�*td|j|��||<d}�Kt	|��}|s
||dfSt|j��}t||��D]
\}}|||<�t
j||j��}	|||	|<|	dfS)z5Internal auxiliary function for _raw_fft, _raw_fftnd.FNrT)	�slicerr-r!�tupler.r9�zerosr3)
rr!r�	must_copyr
�n�axr%�axis�zs
          r
�
_fix_shaperSps����I��4�[�[�M�!�&� �E��U�D�!�!�����2��7�2�;�!����a����E�"�I�I��a�����-�-�E�"�I��I�I��%�L�L�E�����x�����Q�W�
�
�A��u�d�#�#�����4���$���
���A�G���A���x�A�e�H��d�7�Nrc�x�|dkr"td�|�����t||f|f��S)Nrr()rrrS)rrOrQs   r
�
_fix_shape_1drU�sI���1�u�u��;�B�B�1�E�E�G�G�	G��a�!���w�'�'�'r�)N�backward�ortho�forwardc�t�	t|}|r|nd|z
S#t$rtd|�d���d�wxYw)zAReturns the pypocketfft normalization mode from the norm argumentrVzInvalid norm value z,, should be "backward", "ortho" or "forward"N)�	_NORM_MAP�KeyErrorr)�normrY�inorms   r
�_normalizationr_�si��=��$����0�u�u�a�%�i�0���=�=�=��
2�$�
2�
2�
2�3�3�8<�	=�=���s��7c���|�ttdd��S|dkrC|tkr|dtzz
}n>td�|t�����|dkrtd���|S)N�default_workersrrz<workers value out of range; got {}, must not be less than {}zworkers must not be zero)�getattr�_config�
_cpu_countrr)�workerss r
�_workersrf�s������w� 1�1�5�5�5���{�{��z�k�!�!��q�:�~�%�G�G��-�-3�V�G�j�[�-I�-I�K�K�
K�	�A����3�4�4�4��Nrc#�K�t��}ttj|����t_	dV�|t_dS#|t_wxYw)a�Context manager for the default number of workers used in `scipy.fft`

    Parameters
    ----------
    workers : int
        The default number of workers to use

    Examples
    --------
    >>> import numpy as np
    >>> from scipy import fft, signal
    >>> rng = np.random.default_rng()
    >>> x = rng.standard_normal((128, 64))
    >>> with fft.set_workers(4):
    ...     y = signal.fftconvolve(x, x)

    N)�get_workersrfr	r
rcra)re�old_workerss  r
�set_workersrj�s[����&�-�-�K�&�x�~�g�'>�'>�?�?�G��.�
����"-������+���-�-�-�-s�A�Ac�.�ttdd��S)z�Returns the default number of workers within the current context

    Examples
    --------
    >>> from scipy import fft
    >>> fft.get_workers()
    1
    >>> with fft.set_workers(4):
    ...     fft.get_workers()
    4
    rar)rbrcrrr
rhrh�s���7�-�q�1�1�1r)N)�numbersrr	�os�	threading�
contextlib�numpyr9�pypocketfftr�localrc�	cpu_countrdrr1rBrIrSrUr[r_rf�contextmanagerrjrhrrr
�<module>rusD������������	�	�	�	�������������"�"�"�"�"�"�
�)�/�
�
��
�R�\�^�^�
�
�
�
�
�4$�$�$�N/�/�/�(	�	�	����6(�(�(��!�a�A�>�>�	�=�=�=�
�
�
� ��.�.���.�42�2�2�2�2r

Youez - 2016 - github.com/yon3zu
LinuXploit