o
    i                      @   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      ?)Z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|=)ZatolTonlyr      )nparangereshapeZastypeZfloat64r   r   r   number_callscr   return_value)funcZnp_funcmockxZanswery r1   V/home/kim/smarthome/.venv/lib/python3.10/site-packages/scipy/fft/tests/test_backend.pytest_backend_call8   s   r3   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)matchZfoo)planTr$   r   r&   r5   )r'   r(   r)   pytestZraisesNotImplementedErrorr   r   r*   r+   r   r,   Z	last_argsl)r-   r.   r/   r0   r1   r1   r2   test_backend_planV   s   "r9   )6	functoolsr   numpyr'   Z	scipy.fftZscipyr   r   r   Zscipy.fft.testsr   Znumpy.testingr   r   r6   fnamesr	   r
   r   r   r   r   r   r   r   r   r   r   ZhfftZhfft2ZhfftnZihfftZihfft2Zihfftnr   r   r   r   r   r   r   r   r   r   Znp_funcsfuncsZmocksmarkZparametrizezipr3   Z
plan_funcsZ
plan_mocksr9   r1   r1   r1   r2   <module>   sx    
