o
    `^h                      @   s*  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d	eej+d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d	eejj+d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/0d
e1e-e,e.d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/0de1e3e4d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                 C   s   t dd}||t j}t| ||dd ttdd d|j_	| |}t
||j t
|jj	d W d    n1 s?w   Y  t| ||d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y r7   Z/home/air/shanriGPT/back/venv/lib/python3.10/site-packages/scipy/fft/tests/test_backend.pytest_backend_call8   s   r9   z
func, mockc                 C   s   t dd}tjtdd | |dd W d    n1 s w   Y  ttdd+ d	|j_	| |dd}t
||j t
|jj	d
 t
|jjd
 d d W d    d S 1 sYw   Y  d S )Nr"   r#   zprecomputed plan)matchfoo)planTr&   r   r(   r<   )r)   r*   r+   pytestraisesNotImplementedErrorr   r   r.   r/   r   r0   	last_argsl)r1   r3   r4   r6   r7   r7   r8   test_backend_planV   s   "rB   )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zipr9   
plan_funcs
plan_mocksrB   r7   r7   r7   r8   <module>   sx    
