+
    /i<                     $   ^ RI t ^ RIt^ RIHtHtHt ^ RIt^ RIH	t
 ^ RIHtHtHtHtHt ^ RIHtHtHtHtHt ]P*                  P,                  t]! ]
4       ! R R4      4       t]! RR	R
7       ! R R4      4       t]! ]
4       ! R R4      4       tR# )    N)assert_array_almost_equalxp_assert_closemake_xp_test_case)cont2discrete)dlsimss2tfss2zpklsimlti)tf2ssimpulsedimpulsestepdstepc                      a  ] tR t^t o R tR tR tR tR tR t	R t
R tR	 t]! R
R7      R 4       tR t]! R
R7      R 4       t]! R
R7      R 4       tRtV tR# )TestC2Dc                   VP                  ^VP                  R7      pVP                  RRVP                  R7      pVP                  RR.RR.RR..4      pVP                  R.R.R..4      pRVP                  ^4      ,          pVP                  RR4      pRp\	        W#WE3VR	R
7      w  rrp\        Wi4       \        Wz4       \        WK4       \        W\4       \        P                  ! WRR7      '       g   Q hR# )   )dtype      ?      ?      ?      ?        )a?g6<S?zohmethod+=abs_tolNr      Qտ)eyefloat64fullasarrayc2dr   mathisclose)selfxpacbcccdcad_truthbd_truthdt_requestedadbdcddddts   &&            c/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/signal/tests/test_cont2discrete.pytest_zohTestC2D.test_zoh   s    VVARZZV(WWVS

W3ZZ$sCj3+>?ZZ#w/0$rvvay0776#45 ""!1<N!(/!(/!")!")||Be<<<<    c                   VP                  ^4      pVP                  RR4      pVP                  RR.RR.RR..4      pVP                  R.R.R..4      pRVP                  ^4      ,          pVP                  RR4      pTpVP                  R.R	.R..4      p	Rp
\        W#WE3V
R
R7      w  rrp\	        Wk4       \	        W|4       \	        W4       \	        W4       \
        P                  ! WRR7      '       g   Q hR# )r   r   r   r   r   r   r   gm?g>."?g4pL	?fohr   r   r    Nr"   r$   g.Ȫq¿r%   r'   r(   r)   r   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   cd_truthdd_truthr4   r5   r6   r7   r8   r9   s   &&              r:   test_fohTestC2D.test_foh(   s   VVAYWWVS!ZZ$sCj3+>?ZZ#w/0 %rvvay0776#45:: 1201124 5  ""!1<N!(/!(/!(/!(/||Be<<<<r=   c                   VP                  ^4      pVP                  RR4      pVP                  RR.RR.RR..4      pVP                  R.R.R..4      pRVP                  ^4      ,          pVP                  RR4      pTpVP                  R.R.R	..4      p	Rp
\        W#WE3V
R
R7      w  rrp\	        Wk4       \	        W|4       \	        W4       \	        W4       \
        P                  ! WRR7      '       g   Q hR# )r   r   r   r   r   r   r   g)a?g      ?g      ?r   r   r   r    Nr"   r@   rA   s   &&              r:   test_impulseTestC2D.test_impulse?   s    VVAYWWVS!ZZ$sCj3+>?ZZ#u-. %rvvay0776#45::x#9: ""!1<(13 	"(/!(/!(/!(/||Be<<<<r=   c                   VP                  ^4      pVP                  RR4      pVP                  RR.RR.RR..4      pVP                  R.R.R..4      pRpRpRVP                  ^4      ,          pVP                  RR4      p	VP                  RR	.R	R	.R	R..4      p
VP                  R
.R.R..4      p\        W#WE3VRVR7      w  rrp\	        W4       \	        W4       \	        W4       \	        W4       R# )r   r   r   r   r   r   g?333333??333333?ffffff?皙?gbtr   alphaNr"   r$   UUUUUU?=
ףp=ʿr%   r'   r(   r)   r   )r,   r-   r.   r/   r0   r1   r4   rQ   r2   r3   rB   rC   r5   r6   r7   r8   r9   s   &&               r:   test_gbtTestC2D.test_gbtU   s   VVAYWWVS!ZZ$sCj3+>?ZZ#w/0?7763'::Sz #Sz #Sz+ , ::w #u &x) * !""!1<(-U< 	"(/!(/!(/!(/r=   c                   VP                  ^4      pVP                  RR4      pVP                  RR.RR.RR..4      pVP                  R.R.R..4      pRpRVP                  ^4      ,          pVP                  RR4      pVP                  RR.RR.RR..4      p	Tp
\        W#WE3VRR7      w  rrp\	        W{4       \	        W4       \	        W4       \	        W4       \
        P                  ! WR	R
7      '       g   Q hR# )r   r   r   r   r   r         ?eulerr   r   r    Nr"   r$   r@   r,   r-   r.   r/   r0   r1   r4   r2   r3   rB   rC   r5   r6   r7   r8   r9   s   &&              r:   
test_eulerTestC2D.test_eulero   s   VVAYWWVS!ZZ$sCj3+>?ZZ#w/0?7764(::c{ #Sz #T{, -  ""!1<(/1 	"(/!(/!(/!(/||Be<<<<r=   c                   VP                  ^4      pVP                  RR4      pVP                  RR.RR.RR..4      pVP                  R.R.R..4      pRpRVP                  ^4      ,          pVP                  RR4      pVP                  RR.RR.RR..4      p	VP                  R.R.R	..4      p
\        W#WE3VR
R7      w  rrp\	        W{4       \	        W4       \	        W4       \	        W4       R# )r   r   r   r   r   r   g       @rX   g      ?gzG?backward_diffr   Nr"   r$   rT   rZ   s   &&              r:   test_backward_diffTestC2D.test_backward_diff   s   VVAYWWVS!ZZ$sCj3+>?ZZ#w/0?7763'::Sz #Sz #Sz+ , ::w #u %w( ) !""!1<(79 	"(/!(/!(/!(/r=   c                   VP                  ^4      pVP                  RR4      pVP                  RR.RR.RR..4      pVP                  R.R.R..4      pRpRVP                  ^4      ,          pVP                  RR4      pVP                  RR.RR.RR..4      p	VP                  R.R.R..4      p
\        W#WE3VRR7      w  rrp\	        W{4       \	        W4       \	        W4       \	        W4       \
        P                  ! WR	R
7      '       g   Q hRVP                  ^4      ,          pVP                  RR4      pVP                  RR.RR.RR..4      p	VP                  R.R.R..4      p
Rp\        W#WE3VRR7      w  rrp\	        W{4       \	        W4       \	        W4       \	        W4       \
        P                  ! Wo4      '       g   Q hR# )r   r   r   r   r   r   g?bilinearr   r   r    gffffff?rN   rK   rL   rJ   rM   Nr"   r$   g?rR   gUUUUUU?g>X%rS   r@   rZ   s   &&              r:   test_bilinearTestC2D.test_bilinear   s   VVAYWWVS!ZZ$sCj3+>?ZZ#w/0*7769-::Y/ )95 )957 8 :: 12 ){ 235 6 !""!1<(24 	"(/!(/!(/!(/||Be<<<< ?7763'::SzC:SzBC::wx89  ""!1<(24 	"(/!(/!(/!(/||L----r=   c                0   VP                  . RO4      pVP                  . RO4      pVP                  . RO.4      pVP                  . RO4      pRp\        W#3VRR7      w  rxp	\        WG4       \        WX4       \        P                  ! Wi4      '       g   Q hR# )	r   r   r   r   N)r   r   r   )r   r   r   )rR   gNZۿgϱ)_?)r   g]Ogoh?)r(   r)   r   r*   r+   )
r,   r-   numcdencnumddendr4   numdenr9   s
   &&        r:   test_transferfunctionTestC2D.test_transferfunction   s    zz+,zz+,zzMNOzzFGD<eD"!$,!$,||L----r=   c                   VP                  R R.4      pVP                  RVP                  ^4      ,          R	VP                  ^4      ,          .4      pRpVP                  RR.4      pVP                  R
R.4      pRpR p\        W#V3VRR7      w  rr\	        WY4       \	        Wj4       \
        P                  ! W{4      '       g   Q h\
        P                  ! W4      '       g   Q hR# )r   y              ?r   gwRN?g.-.?r   r   Ng      y             y\9O?(?y\9O?(ֿ)arraysqrtr(   r)   r   r*   r+   )r,   r-   zeros_cpoles_ck_czeros_dpolls_dk_dr4   zerospoleskr9   s   &&           r:   test_zerospolesgainTestC2D.test_zerospolesgain   s    ((C;'((C"''!*,dRWWQZ.?@A**.0ABC**DDF G!7S"9<).0a 	"'1!'1||C####||L----r=   T)np_onlyc                   RpRpRpRp\        W#WE4      w  rg\        W#WE4      w  rp
RpRp^^V,
          V,          V,          ,           ^W,          V,          ,
          ,          pW,          ^W,          V,          ,
          ,          pV^W,          V,          ,
          ,          pW\V,          V,          ,           p\        WVV4      w  pp\        Wg3VRVR7      w  ppp\        VV4       \        VV4       \        WVV4      w  ppp\        WV
3VRVR7      w  pppp\        VV4       \        VV4       \        VV4       R# )z7Test method='gbt' with alpha=0.25 for tf and zpk cases.r   r   r   rO   rP   Ng      )r   r	   r)   r   )r,   r-   ABCDcnumcdenczcpckhrQ   AdBdCdDddnumddenc2dnumc2ddenr9   dzdpdkc2dzc2dpc2dks   &&                          r:   test_gbt_with_sio_tf_and_zpk$TestC2D.test_gbt_with_sio_tf_and_zpk   s?     1&
 A!'
 1u9/A%%!ei!m*;<Ua%)a-'(!ei!m#$R 22r*
d !$qeLf%f% BB+
B  #BB<5NdD"D!D!D!r=   c                F  a V3R lpSP                  R..4      pSP                  R..4      pSP                  R..4      pSP                  R..4      pRpSP                  ^ R^e4      pV^,          V^ ,          ,
          p	V! V4      p
\        W4WV3WVR7      w  rp\        W4WV3V	RR7      pRV
R	R V
R
,          ,           ,          pVR	R p\	        WP                  R^4      WR7      w  pppRVR	R VR
,          ,           ,          p\        VP                  4       VRR7       R	# )z
Test that the solution to the discrete approximation of a continuous
system actually approximates the solution to the continuous system.
This is an indirect test of the correctness of the implementation
of cont2discrete.
c                 4   < SP                  R V ,          4      # )g      @)sin)tr-   s   &r:   u'TestC2D.test_discrete_approx.<locals>.u"  s    66#'?"r=   r   rN   g      $@)TUX0rb   r   r   N:r#   NN)r   r   x0g-C6?rtolg{Gz)r(   linspacer
   r)   r   reshaper   ravel)r,   r-   r   abcdr   r   r9   u1youtxoutdsysu2t2td2yd2xd2ymids   &f                  r:   test_discrete_approxTestC2D.test_discrete_approx  s   	# JJy!JJwJJwJJwKK4%qTAaD[qT aA\Q< A!<J7 BsGbf$%sVdjjQ&72ES#
 d3Bi$r(*+		T5r=   c                    ^^ .^^..^^.3p\        VR4      w  r#pVR8X  g   Q h\        V^R.RR7       \        V^R.^R..RR7       R# )r#   {Gz?gMbP?r   NgUxer   gT(|)r)   r   )r,   tfrj   rk   r9   s   &    r:   test_simo_tfTestC2D.test_simo_tfB  se     1v1vA'2t}"Tzza.T:q"g;'78tDr=   c                t   R p^R.^^..^^.3p\        W!4      w  r4pV^ ,          ^ ,          V^,          3p\        Wa4      w  rxp	V^ ,          ^,          V^,          3p
\        W4      w  rpWY8X  g   Q hW]8X  g   Q h\        V\        P                  ! W{34      RR7       \        WHRR7       \        WLRR7       R# )r   gvIh%<=r   N)r)   r   npvstack)r,   tsr   rj   rk   r9   tf1num1den1dt1tf2num2den2dt2s   &             r:   test_multioutputTestC2D.test_multioutputL  s    2wA!Q(2{"!uQxAc,C!uQxAc,C yyyy 	RYY|45A 	..r=    N)__name__
__module____qualname____firstlineno__r;   rD   rG   rU   r[   r_   rc   rl   rz   skip_xp_backendsr   r   r   r   __static_attributes____classdictcell____classdict__s   @r:   r   r      s     =&=.=,04=002*.X..( d#(" $("T&6P d#E $E d#/ $/r=   r   Tzlti currently not supported)r|   reasonc                   ,   a  ] tR tRt o R tR tRtV tR# )
TestC2dLtiie  c                D   \         P                  ! RR.RR..4      p\         P                  ! ^ .^..4      p\         P                  ! ^^ ..4      p^ pRp\         P                  ! RR.RR..4      p\         P                  ! R.R	..4      p\        W#WE4      p	V	P                  VR
7      p
\	        V
P
                  V4       \	        V
P                  V4       \	        V
P                  V4       \	        V
P                  \         P                  ! V
P                  4      4       \        WR
7      p\	        VP
                  V4       \	        VP                  V4       \	        VP                  V4       \	        VP                  \         P                  ! VP                  4      4       R# )rJ   皙?rN   g?gГ<?gs?g?g{Kp?g1vM ?g_ǷJ(?)r9   Ng333333ӿgffffff)r   ro   r   to_discreter   r~   r   r   r   
zeros_liker)   )r,   r-   r~   r   r   r   r9   A_resB_ressys_sscsys_ssdsys_ssd2s   &&          r:   test_c2d_ssTestC2dLti.test_c2d_ssg  sE   HHtSkC;/0HHqcA3Z HHq!fX,.?@,.?@B C,-0A/BCDaA/%%%,		5)		5)		1%		2==#;<w&

E*

E*

A&

BMM(**$=>r=   c                   \        R R.RR.4      pVP                  R4      p\        P                  ! R R.4      p\        P                  ! RR	.4      p\	        VP
                  VRR7       \	        VP                  VRR7       R# )
r   rJ   r   g?g{Gzt?g{Gz?)atolNgi߿gY쭛])r   r   r   ro   r   rk   rj   )r,   r-   sysnum_resden_ress   &&   r:   test_c2d_tfTestC2dLti.test_c2d_tf  sp    3*sCj)ooe$ ((C!345((C!345 	t4t4r=   r   N)r   r   r   r   r   r   r   r   r   s   @r:   r   r   e  s     ?65 5r=   r   c                   ^  a  ] tR tRt o ]! ^^.. RO4      R^
3]! ^^.. RO4      R^
3]! R. RO4      R^
3.t]! ]]4      ]	P                  P                  R]4      R 4       4       t]	P                  P                  R]4      R 4       t]	P                  P                  R]4      R 4       tR	tV tR
# )TestC2dInvariantsi  r   r   r   zsys,sample_time,samples_numberc                @   \        \        VP                  V4      4      pVP                  V4      V,          p\	        W%R 7      w  rg\        \        W#RR7      \        V4      R7      w  rh\        W7P                  4       ,          V^ ,          P                  4       4       R# )r   r   r   nN)
tuplemapr(   aranger   r   r)   lenr   r   	r,   r-   r   sample_timesamples_numbertime_	yout_cont	yout_discs	   &&&&&    r:   test_impulse_invariant(TestC2dInvariants.test_impulse_invariant  su     C

C()yy(;6s+CY G"%d)-oo&7719K9K9MNr=   c                4   \        \        VP                  V4      4      pVP                  V4      V,          p\	        W%R 7      w  rg\        \        W#RR7      \        V4      R7      w  rh\        VP                  4       V^ ,          P                  4       4       R# )r   r   r   r   N)
r   r   r(   r   r   r   r)   r   r   r   r   s	   &&&&&    r:   test_step_invariant%TestC2dInvariants.test_step_invariant  sm    C

C()yy(;6C(S%@CIN	)9Q<+=+=+?@r=   c                   \        \        VP                  V4      4      pVP                  V4      V,          p\	        W%VR 7      w  rgp\        \        W#RR7      VR7      w  rhp\        VP                  4       VP                  4       4       R# ))r   r   r?   r   )r   N)	r   r   r(   r   r
   r   r)   r   r   r   s	   &&&&&    r:   test_linear_invariant'TestC2dInvariants.test_linear_invariant  si    C

C()yy(;6sd3aCU CtLa	)9??+<=r=   r   N)r#   rX   r#   )r#   rX      r#   )r#   r#   r   r#   )r   r   r   r   r   casesr   r   r   pytestmarkparametrizer   r   r  r   r   r   s   @r:   r   r     s     
 
1v{	#T2.	1v~	&R0	sL	!3+E w)[[=uEO F *O [[=uEA FA [[=uE> F>r=   r   )r*   numpyr   scipy._lib._array_apir   r   r   r  scipy.signalr   r)   r   r   r	   r
   r   r   r   r   r   r   r  r   r   r   r   r   r=   r:   <module>r     s      
  - 8 8 > >
 ;;//  3O/ O/ O/b
 $'DE'5 '5 F'5T 3%> %> %>r=   