
    _Mh                      	   d dl mZ d dlZd dlZd dlmZmZmZ d dl	m
Z
 d dlmZmZ d dlZdZej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        ej        ej        j        ej         ej!        ej"        ej#        ej$        ej%        ej&        ej'        ej(        ej)         eej*        dd	           eej+        dd	          fZ,ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j         ej        j!        ej        j"        ej        j#        ej        j$        ej        j%        ej        j&        ej        j'        ej        j(        ej        j)         eej        j*        dd	           eej        j+        dd	          fZ-e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j         e
j!        e
j"        e
j#        e
j$        e
j%        e
j&        e
j'        e
j(        e
j)        e
j*        e
j+        fZ.ej/        0                    d
 e1e-e,e.                    d             Z2ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j        ej        j         ej        j!        fZ3e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j        e
j         e
j!        fZ4ej/        0                    d e1e3e4                    d             Z5dS )    )partialN)_fftlog
_pocketfftset_backend)mock_backend)assert_allcloseassert_equal)fftfft2fftnifftifft2ifftnrfftrfft2rfftnirfftirfft2irfftndctidctdctnidctndstidstdstnidstnfhtifht   g      ?)dlnmuzfunc, np_func, mockc                    t          j        d                              d          } ||                    t           j                            }t           | |          |d           t          t          d          5  d|j        _	         | |          }t          ||j                   t          |j        j	        d           d d d            n# 1 swxY w Y   t           | |          |d           d S )	N   
   r    g|=)atolTonlyr      )nparangereshapeastypefloat64r   r   r   number_callscr	   return_value)funcnp_funcmockxanswerys         \/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/scipy/fft/tests/test_backend.pytest_backend_callr:   8   s%   
	"f%%AWQXXbj))**FDDGGV%0000	\	-	-	- - -DGGQ)***T&(!,,,	- - - - - - - - - - - - - - - DDGGV%000000s   ACCCz
func, mockc                    t          j        d                              d          }t          j        t
          d          5   | |d           d d d            n# 1 swxY w Y   t          t          d          5  d	|j        _	         | |d          }t          ||j                   t          |j        j	        d
           t          |j        j        d
         d         d           d d d            d S # 1 swxY w Y   d S )Nr$   r%   zprecomputed plan)matchfoo)planTr(   r   r*   r>   )r+   r,   r-   pytestraisesNotImplementedErrorr   r   r0   r1   r	   r2   	last_argsl)r3   r5   r6   r8   s       r9   test_backend_planrD   V   s~   
	"g&&A	*2D	E	E	E  QU               
\	-	-	- 9 9DQ)***T&(!,,,T^%a(0%8889 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9s%   AA!$A!>A/C::C>C>)6	functoolsr   numpyr+   	scipy.fftscipyr   r   r   scipy.fft.testsr   numpy.testingr   r	   r?   fnamesr
   r   r   r   r   r   r   r   r   r   r   r   hffthfft2hfftnihfftihfft2ihfftnr   r   r   r   r   r   r   r   r   r   np_funcsfuncsmocksmarkparametrizezipr:   
plan_funcs
plan_mocksrD        r9   <module>r\      s<                 6 6 6 6 6 6 6 6 6 6 ( ( ( ( ( ( 7 7 7 7 7 7 7 7 
 FJRV[FKrv|FKrv|FL"&-FK):+;FL*+Z->NJOZ_j>NNJOZ_j>NGGKQ3///GGLaC000
2 
			%)/	%)/	%)*EI,<	%)/	%)*EI,<									A#	.	.	.	Q3	/	/	/
	1 
	<,l.?		L.0B		L.0B		\0,2E		L.0B		\0,2E		<,		L.		<,		L.		<,
	. .E8U0K0KLL1 1 ML1 imUY^UY^ineiouyineiouyiouy/1Aineiouyiouy/1AC
  1<3D!3\5G!3\5G ,"5|7J!3\5G ,"5|7JL
 ss:z'B'BCC9 9 DC9 9 9r[   