L i ^ddlmZddlZddlZddlmZmZmZddl m Z ddl m Z m Z ddlZdZej j ej j"ej j$ej j&ej j(ej j*ej j,ej j.ej j0ej j2ej j4ej j6ej j8ej:ej<ej j>ej@ejBejDejFejHejJejLejNejPejReejTdd eejVdd fZ,ej j ej j"ej j$ej j&ej j(ej j*ej j,ej j.ej j0ej j2ej j4ej j6ej j8ej j:ej j<ej j>ej j@ej jBej jDej jFej jHej jJej jLej jNej jPej jReej jTdd eej jVdd fZ-e j e j"e j$e j&e j(e j*e j,e j.e j0e j2e j4e j6e j8e j:e j<e j>e j@e jBe jDe jFe jHe jJe jLe jNe jPe jRe jTe jVfZ.ej^jad e1e-e,e.d Z2ej j ej j"ej j$ej j&ej j(ej j*ej j,ej j.ej j0ej j2ej j4ej j6ej j8ej j:ej j<ej j>ej j@ej jBfZ3e j e j"e j$e j&e j(e j*e j,e j.e j0e j2e j4e j6e j8e j:e j<e j>e j@e jBfZ4ej^jad e1e3e4d Z5y))partialN)_fftlog _pocketfft set_backend) mock_backend)assert_allclose assert_equal)fftfft2fftnifftifft2ifftnrfftrfft2rfftnirfftirfft2irfftndctidctdctnidctndstidstdstnidstnfhtifhtg?)dlnmuzfunc, np_func, mockctjdjd}||jtj}t |||dt td5d|j_ ||}t||jt|jjddddt |||dy#1swYxYw) N r g|=)atolTonlyr) nparangereshapeastypefloat64rrr number_callscr return_value)funcnp_funcmockxanswerys b/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/scipy/fft/tests/test_backend.pytest_backend_callr:8s " f%A QXXbjj) *FDGV%0 \ -- GQ))*T&&((!, - DGV%0 --s /ACC%z func, mockctjdjd}tjt d5||ddddt td5d |j_ ||d}t||jt|jjd t|jjd d ddddy#1swYxYw#1swYyxYw) Nr$r%zprecomputed plan)matchfoo)planTr(rr*r>)r+r,r-pytestraisesNotImplementedErrorrrr0r1r r2 last_argsl)r3r5r6r8s r9test_backend_planrDVs " g&A *2D E QU \ -9  Q))*T&&((!,T^^%%a(0%8 9999s C%$A8C1%C.1C:)6 functoolsrnumpyr+ scipy.fftscipyrrrscipy.fft.testsr numpy.testingrr r?fnamesr r r r rrrrrrrrhffthfft2hfftnihfftihfft2ihfftnrrrrrrrrrrnp_funcsfuncsmocksmark parametrizezipr: plan_funcs plan_mocksrDr9r\s766(7   FFJJ RVV[[ FFKKrvv|| FFKKrvv|| FFLL"&&-- FFKK)):+;+; FFLL*++Z->-> NNJOOZ__j>N>N NNJOOZ__j>N>N GKKQ3 / GLLaC 0 2    %))// %))// %))**EII,<,< %))// %))**EII,<,<         A# . Q3 / 1   <,,l.?.?   L.. 0B0B   L.. 0B0B   \00,2E2E   L.. 0B0B   \00,2E2E   <,,   L..   <,,   L..   <,, ..E8U0KL 1M 1iimmUYY^^UYY^^iinneiioouyyiinneiioouyyiioouyy//1A1Aiinneiioouyyiioouyy//1A1A C  1 1<3D3D!3!3\5G5G!3!3\5G5G  ,"5"5|7J7J!3!3\5G5G  ,"5"5|7J7J L s:z'BC 9D 9r[