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/ndimage/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

d�c~,��f�ddlZddlmZddlmZddlmZgd�Zd�Zd�Zdd
�Z	dd�Z
dd�Zdd
�ZdS)�N)�normalize_axis_index�)�_ni_support)�	_nd_image)�fourier_gaussian�fourier_uniform�fourier_ellipsoid�
fourier_shiftc��|�v|jjtjtjtjfvr!tj|j|j���}n�tj|jtj���}n�t|��tur[|tjtjtjtjfvrtd���tj|j|���}n|j|jkrtd���|S�N��dtypezoutput type not supportedzoutput shape not correct)
r�type�numpy�	complex64�
complex128�float32�zeros�shape�float64�RuntimeError��output�inputs  �8/usr/lib/python3/dist-packages/scipy/ndimage/_fourier.py�_get_output_fourierr(s���
�~��;�����1A� %�
� /�/�/��[���E�K�@�@�@�F�F��[���E�M�B�B�B�F�F�	
�f����	�	��%�/�5�+;��-���8�8�8��:�;�;�;���U�[��7�7�7���	����	$�	$��5�6�6�6��M�c���|�k|jjtjtjfvr!tj|j|j���}n�tj|jtj���}nzt|��turE|tjtjfvrtd���tj|j|���}n|j|jkrtd���|Sr)rrrrrrrrrs  r�_get_output_fourier_complexr9s���
�~��;�����1A�B�B�B��[���E�K�@�@�@�F�F��[���E�4D�E�E�E�F�F�	
�f����	�	��%�/�5�+;�<�<�<��:�;�;�;���U�[��7�7�7���	����	$�	$��5�6�6�6��Mr���c�^�tj|��}t||��}t||j��}tj||j��}tj|tj���}|jj	s|�
��}tj|||||d��|S)a
    Multidimensional Gaussian fourier filter.

    The array is multiplied with the fourier transform of a Gaussian
    kernel.

    Parameters
    ----------
    input : array_like
        The input array.
    sigma : float or sequence
        The sigma of the Gaussian kernel. If a float, `sigma` is the same for
        all axes. If a sequence, `sigma` has to contain one value for each
        axis.
    n : int, optional
        If `n` is negative (default), then the input is assumed to be the
        result of a complex fft.
        If `n` is larger than or equal to zero, the input is assumed to be the
        result of a real fft, and `n` gives the length of the array before
        transformation along the real transform direction.
    axis : int, optional
        The axis of the real transform.
    output : ndarray, optional
        If given, the result of filtering the input is placed in this array.

    Returns
    -------
    fourier_gaussian : ndarray
        The filtered input.

    Examples
    --------
    >>> from scipy import ndimage, datasets
    >>> import numpy.fft
    >>> import matplotlib.pyplot as plt
    >>> fig, (ax1, ax2) = plt.subplots(1, 2)
    >>> plt.gray()  # show the filtered result in grayscale
    >>> ascent = datasets.ascent()
    >>> input_ = numpy.fft.fft2(ascent)
    >>> result = ndimage.fourier_gaussian(input_, sigma=4)
    >>> result = numpy.fft.ifft2(result)
    >>> ax1.imshow(ascent)
    >>> ax2.imshow(result.real)  # the imaginary part is an artifact
    >>> plt.show()
    r
r�
r�asarrayrr�ndimr�_normalize_sequencer�flags�
contiguous�copyr�fourier_filter)r�sigma�n�axisr�sigmass      rrrHs���\
�M�%� � �E�
 ���
/�
/�F���e�j�1�1�D�
�
,�U�E�J�
?�
?�F�
�]�6���
7�
7�
7�F��<�"��������
��U�F�A�t�V�Q�?�?�?��Mrc�^�tj|��}t||��}t||j��}tj||j��}tj|tj���}|jj	s|�
��}tj|||||d��|S)a
    Multidimensional uniform fourier filter.

    The array is multiplied with the Fourier transform of a box of given
    size.

    Parameters
    ----------
    input : array_like
        The input array.
    size : float or sequence
        The size of the box used for filtering.
        If a float, `size` is the same for all axes. If a sequence, `size` has
        to contain one value for each axis.
    n : int, optional
        If `n` is negative (default), then the input is assumed to be the
        result of a complex fft.
        If `n` is larger than or equal to zero, the input is assumed to be the
        result of a real fft, and `n` gives the length of the array before
        transformation along the real transform direction.
    axis : int, optional
        The axis of the real transform.
    output : ndarray, optional
        If given, the result of filtering the input is placed in this array.

    Returns
    -------
    fourier_uniform : ndarray
        The filtered input.

    Examples
    --------
    >>> from scipy import ndimage, datasets
    >>> import numpy.fft
    >>> import matplotlib.pyplot as plt
    >>> fig, (ax1, ax2) = plt.subplots(1, 2)
    >>> plt.gray()  # show the filtered result in grayscale
    >>> ascent = datasets.ascent()
    >>> input_ = numpy.fft.fft2(ascent)
    >>> result = ndimage.fourier_uniform(input_, size=20)
    >>> result = numpy.fft.ifft2(result)
    >>> ax1.imshow(ascent)
    >>> ax2.imshow(result.real)  # the imaginary part is an artifact
    >>> plt.show()
    r
rr"�r�sizer+r,r�sizess      rrr�s���\
�M�%� � �E�
 ���
/�
/�F���e�j�1�1�D��+�D�%�*�=�=�E��M�%�u�}�5�5�5�E��;�!���
�
����
��U�E�1�d�F�A�>�>�>��Mrc��tj|��}|jdkrtd���t	||��}|jdkr|St
||j��}tj||j��}tj|tj	���}|j
js|���}tj|||||d��|S)ah
    Multidimensional ellipsoid Fourier filter.

    The array is multiplied with the fourier transform of an ellipsoid of
    given sizes.

    Parameters
    ----------
    input : array_like
        The input array.
    size : float or sequence
        The size of the box used for filtering.
        If a float, `size` is the same for all axes. If a sequence, `size` has
        to contain one value for each axis.
    n : int, optional
        If `n` is negative (default), then the input is assumed to be the
        result of a complex fft.
        If `n` is larger than or equal to zero, the input is assumed to be the
        result of a real fft, and `n` gives the length of the array before
        transformation along the real transform direction.
    axis : int, optional
        The axis of the real transform.
    output : ndarray, optional
        If given, the result of filtering the input is placed in this array.

    Returns
    -------
    fourier_ellipsoid : ndarray
        The filtered input.

    Notes
    -----
    This function is implemented for arrays of rank 1, 2, or 3.

    Examples
    --------
    >>> from scipy import ndimage, datasets
    >>> import numpy.fft
    >>> import matplotlib.pyplot as plt
    >>> fig, (ax1, ax2) = plt.subplots(1, 2)
    >>> plt.gray()  # show the filtered result in grayscale
    >>> ascent = datasets.ascent()
    >>> input_ = numpy.fft.fft2(ascent)
    >>> result = ndimage.fourier_ellipsoid(input_, size=20)
    >>> result = numpy.fft.ifft2(result)
    >>> ax1.imshow(ascent)
    >>> ax2.imshow(result.real)  # the imaginary part is an artifact
    >>> plt.show()
    �z'Only 1d, 2d and 3d inputs are supportedrr
�)rr#r$�NotImplementedErrorrr0rrr%rr&r'r(rr)r/s      rr	r	�s���d
�M�%� � �E��z�A�~�~�!�"K�L�L�L�
 ���
/�
/�F�
�{�a����
���e�j�1�1�D��+�D�%�*�=�=�E��M�%�u�}�5�5�5�E��;�!���
�
����
��U�E�1�d�F�A�>�>�>��Mrc�\�tj|��}t||��}t||j��}tj||j��}tj|tj���}|jj	s|�
��}tj|||||��|S)a�
    Multidimensional Fourier shift filter.

    The array is multiplied with the Fourier transform of a shift operation.

    Parameters
    ----------
    input : array_like
        The input array.
    shift : float or sequence
        The size of the box used for filtering.
        If a float, `shift` is the same for all axes. If a sequence, `shift`
        has to contain one value for each axis.
    n : int, optional
        If `n` is negative (default), then the input is assumed to be the
        result of a complex fft.
        If `n` is larger than or equal to zero, the input is assumed to be the
        result of a real fft, and `n` gives the length of the array before
        transformation along the real transform direction.
    axis : int, optional
        The axis of the real transform.
    output : ndarray, optional
        If given, the result of shifting the input is placed in this array.

    Returns
    -------
    fourier_shift : ndarray
        The shifted input.

    Examples
    --------
    >>> from scipy import ndimage, datasets
    >>> import matplotlib.pyplot as plt
    >>> import numpy.fft
    >>> fig, (ax1, ax2) = plt.subplots(1, 2)
    >>> plt.gray()  # show the filtered result in grayscale
    >>> ascent = datasets.ascent()
    >>> input_ = numpy.fft.fft2(ascent)
    >>> result = ndimage.fourier_shift(input_, shift=200)
    >>> result = numpy.fft.ifft2(result)
    >>> ax1.imshow(ascent)
    >>> ax2.imshow(result.real)  # the imaginary part is an artifact
    >>> plt.show()
    r
)
rr#rrr$rr%rr&r'r(rr
)r�shiftr+r,r�shiftss      rr
r
�s���Z
�M�%� � �E�
(���
7�
7�F���e�j�1�1�D�
�
,�U�E�J�
?�
?�F�
�]�6���
7�
7�
7�F��<�"��������
��E�6�1�d�F�;�;�;��Mr)r r N)
r�numpy.core.multiarrayr�rr�__all__rrrrr	r
�rr�<module>r=s���>
����6�6�6�6�6�6��������������������"���7�7�7�7�t6�6�6�6�r@�@�@�@�F5�5�5�5�5�5r

Youez - 2016 - github.com/yon3zu
LinuXploit