a
    BCCf                      @   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6 d|_| |}t	||j
 t	|jd W d    n1 sz0    Y  t| ||dd d S )	N   
   r   g|=)ZatolTonlyr      )nparangereshapeZastypeZfloat64r   r   r   number_callsr   return_value)funcZnp_funcmockxZanswery r0   X/var/www/html/django/DPS/env/lib/python3.9/site-packages/scipy/fft/tests/test_backend.pytest_backend_call8   s    *r2   z
func, mockc                 C   s   t dd}tjtdd | |dd W d    n1 s@0    Y  ttddN d	|_| |dd}t	||j
 t	|jd
 t	|jd
 d d W d    n1 s0    Y  d S )Nr!   r"   zprecomputed plan)matchZfoo)planTr$   r   r&   r4   )r'   r(   r)   pytestZraisesNotImplementedErrorr   r   r*   r   r+   Z	last_args)r,   r-   r.   r/   r0   r0   r1   test_backend_planV   s    *r7   )6	functoolsr   numpyr'   Z	scipy.fftZscipyr   r   r   Zscipy.fft.testsr   Znumpy.testingr   r   r5   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zipr2   Z
plan_funcsZ
plan_mocksr7   r0   r0   r0   r1   <module>   sv   
