+
    LV-j@>  ã                   ó  € R t . ROt^ RIt^ RIHtHtHtHtHtH	t	H
t
Ht ^RIHt ^ RIHt ]P                   ! 4       t^R]3R ltR]3R ltR]3R lt]3R lt]3R	 ltR]3R
 ltR]3R ltR]3R ltR]3R ltR]3R ltR# )z1
Differential and pseudo-differential operators.
N)ÚpiÚasarrayÚsinÚcosÚsinhÚcoshÚtanhÚiscomplexobj)Úconvolve)Ú_datacopiedc                ó¸  € \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      pV^ 8X  d   V# \        V4      '       d;   \        VP                  WV4      R\        VP                  WV4      ,          ,           # Ve   ^\        ,          V,          pMRp\        V 4      pVP                  WaV34      pVfP   \        V4      ^8”  d   V'       d   VP                  4        K  W3R lp\        P                  ! WhV^R7      pWsWaV3&   \!        W@4      p	\        P                  ! WGV^,          V	R7      # )aÖ  
Return kth derivative (or integral) of a periodic sequence x.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = pow(sqrt(-1)*j*2*pi/period, order) * x_j
  y_0 = 0 if order is not 0.

Parameters
----------
x : array_like
    Input array.
order : int, optional
    The order of differentiation. Default order is 1. If order is
    negative, then integration is carried out under the assumption
    that ``x_0 == 0``.
period : float, optional
    The assumed period of the sequence. Default is ``2*pi``.

Notes
-----
If ``sum(x, axis=0) = 0`` then ``diff(diff(x, k), -k) == x`` (within
numerical accuracy).

For odd order and even ``len(x)``, the Nyquist mode is taken zero.

Ú
diff_cacheù              ð?ç      ð?c                 ó:   € V '       d   \        W ,          V4      # ^ # ©é    )Úpow)ÚkÚorderÚcs   &&&Úl/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/scipy/fftpack/_pseudo_diffs.pyÚkernelÚdiff.<locals>.kernelI   s   € ßÜ˜1�3˜u“~Ð%Ùó    ©ÚdÚzero_nyquist©Úswap_real_imagÚoverwrite_x)Ú
isinstanceÚ	threadingÚlocalÚhasattrr   r   r	   ÚdiffÚrealÚimagr   ÚlenÚgetÚpopitemr
   Úinit_convolution_kernelr   )
Úxr   ÚperiodÚ_cacheÚtmpr   ÚnÚomegar   r    s
   &&&&      r   r%   r%      s/  € ô: �&œ)Ÿ/™/×*Ò*Ü�v˜|×,Ò,Ø "ˆFÔØ×"Ñ"ˆä
�!‹*€CØ�„zØˆ
Ü�C×ÒÜ�C—H‘H˜e¨VÓ4°R¼Ø�H‰H�e Vó9-õ 6-õ -ð 	-àÒØŒb�D��K‰àˆÜˆA‹€AØ�J‰J˜ �{Ó#€EØ‚}Üˆv‹;˜ÔßØ—‘Ö à ô 	ô ×0Ò0°¸EØ>?ôAˆà#�˜ˆ{ÑÜ˜cÓ%€KÜ×Ò˜S°e¸aµiØ)4ô6ð 6r   c                óš  € \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WV4      R\        VP                  WV4      ,          ,           # Ve   V^,          \        ,          V,          p\        V 4      pVP                  WQ34      pVfN   \        V4      ^8”  d   V'       d   VP                  4        K  V3R lp\        P                  ! WW^R7      pWcWQ3&   \!        W@4      p\        P                  ! WF^VR7      # )a'  
Return h-Tilbert transform of a periodic sequence x.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

    y_j = sqrt(-1)*coth(j*h*2*pi/period) * x_j
    y_0 = 0

Parameters
----------
x : array_like
    The input array to transform.
h : float
    Defines the parameter of the Tilbert transform.
period : float, optional
    The assumed period of the sequence. Default period is ``2*pi``.

Returns
-------
tilbert : ndarray
    The result of the transform.

Notes
-----
If ``sum(x, axis=0) == 0`` and ``n = len(x)`` is odd, then
``tilbert(itilbert(x)) == x``.

If ``2 * pi * h / period`` is approximately 10 or larger, then
numerically ``tilbert == hilbert``
(theoretically oo-Tilbert == Hilbert).

For even ``len(x)``, the Nyquist mode of ``x`` is taken zero.

Útilbert_cacher   c                 óF   € V '       d   R \        W,          4      ,          # ^ # )r   ©r   ©r   Úhs   &&r   r   Útilbert.<locals>.kernel�   s   € ßØœ4 ¥›9•}Ð$ár   ©r   r   )r!   r"   r#   r$   r3   r   r	   Útilbertr&   r'   r   r(   r)   r*   r
   r+   r   ©	r,   r7   r-   r.   r/   r0   r1   r   r    s	   &&&&     r   r:   r:   U   s  € ôH �&œ)Ÿ/™/×*Ò*Ü�v˜×/Ò/Ø#%ˆFÔ Ø×%Ñ%ˆä
�!‹*€CÜ�C×ÒÜ�s—x‘x ¨FÓ3Ø”G˜CŸH™H a°Ó8Õ8õ9ð 	9ð ÒØ��E”B�J˜ÕˆäˆA‹€AØ�J‰J˜�vÓ€EØ‚}Üˆv‹;˜ÔßØ—‘Ö àô 	ô ×0Ò0°¸aÔ@ˆØ�ˆu‰ä˜cÓ%€KÜ×Ò˜S°aÀKÔPÐPr   c                óš  € \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WV4      R\        VP                  WV4      ,          ,           # Ve   V^,          \        ,          V,          p\        V 4      pVP                  WQ34      pVfN   \        V4      ^8”  d   V'       d   VP                  4        K  V3R lp\        P                  ! WW^R7      pWcWQ3&   \!        W@4      p\        P                  ! WF^VR7      # )zÿ
Return inverse h-Tilbert transform of a periodic sequence x.

If ``x_j`` and ``y_j`` are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = -sqrt(-1)*tanh(j*h*2*pi/period) * x_j
  y_0 = 0

For more details, see `tilbert`.

Úitilbert_cacher   c                 ó:   € V '       d   \        W,          4      ) # ^ # r   r5   r6   s   &&r   r   Úitilbert.<locals>.kernel¹   s   € ßÜ˜Q�S›	�zÐ!Ùr   r9   r   )r!   r"   r#   r$   r=   r   r	   Úitilbertr&   r'   r   r(   r)   r*   r
   r+   r   r;   s	   &&&&     r   r@   r@   š   s  € ô �&œ)Ÿ/™/×*Ò*Ü�vÐ/×0Ò0Ø$&ˆFÔ!Ø×&Ñ&ˆä
�!‹*€CÜ�C×ÒÜ˜Ÿ™ !¨VÓ4Ø”(˜3Ÿ8™8 Q°Ó7Õ7õ8ð 	8àÒØˆa�C”�F�6�MˆÜˆA‹€AØ�J‰J˜�uÓ€EØ‚}Üˆv‹;˜ÔßØ—‘Ö àô 	ô ×0Ò0°¸AÔ>ˆØ�ˆu‰Ü˜cÓ%€KÜ×Ò˜S°aÀKÔPÐPr   c                óN  € \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d9   \        VP                  V4      R\        VP                  V4      ,          ,           # \        V 4      pVP                  V4      pVfJ   \        V4      ^8”  d   V'       d   VP                  4        K  R p\        P                  ! W5^R7      pWAV&   \        W 4      p\        P                  ! W$^VR7      # )aŠ  
Return Hilbert transform of a periodic sequence x.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = sqrt(-1)*sign(j) * x_j
  y_0 = 0

Parameters
----------
x : array_like
    The input array, should be periodic.
_cache : dict, optional
    Dictionary that contains the kernel used to do a convolution with.

Returns
-------
y : ndarray
    The transformed input.

See Also
--------
scipy.signal.hilbert : Compute the analytic signal, using the Hilbert
                       transform.

Notes
-----
If ``sum(x, axis=0) == 0`` then ``hilbert(ihilbert(x)) == x``.

For even len(x), the Nyquist mode of x is taken zero.

The sign of the returned transform does not have a factor -1 that is more
often than not found in the definition of the Hilbert transform. Note also
that `scipy.signal.hilbert` does have an extra -1 factor compared to this
function.

Úhilbert_cacher   c                 ó*   € V ^ 8”  d   R# V ^ 8  d   R# R# )r   r   g        g      ð¿© )r   s   &r   r   Úhilbert.<locals>.kernelù   s   € Ø�1ŒuÙØ�Q”Ø�Ùr   r9   r   )r!   r"   r#   r$   rB   r   r	   Úhilbertr&   r'   r(   r)   r*   r
   r+   r   )r,   r.   r/   r0   r1   r   r    s   &&     r   rF   rF   Ã   sã   € ôN �&œ)Ÿ/™/×*Ò*Ü�v˜×/Ò/Ø#%ˆFÔ Ø×%Ñ%ˆä
�!‹*€CÜ�C×ÒÜ�s—x‘x Ó(¨2´¸¿¹À&Ó0IÕ+IÕIÐIÜˆA‹€AØ�J‰J�q‹M€EØ‚}Üˆv‹;˜ÔßØ—‘Ö ò	ô ×0Ò0°¸AÔ>ˆØˆq‰	Ü˜cÓ%€KÜ×Ò˜S°aÀKÔPÐPr   c                ó¤   € \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        W4      ) # )zÍ
Return inverse Hilbert transform of a periodic sequence x.

If ``x_j`` and ``y_j`` are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = -sqrt(-1)*sign(j) * x_j
  y_0 = 0

Úihilbert_cache)r!   r"   r#   r$   rH   rF   )r,   r.   s   &&r   ÚihilbertrI     sD   € ô �&œ)Ÿ/™/×*Ò*Ü�vÐ/×0Ò0Ø$&ˆFÔ!Ø×&Ñ&ˆÜ�AÓÐÐr   c           	     óÔ  € \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WW44      R\        VP                  WW44      ,          ,           # Ve7   V^,          \        ,          V,          pV^,          \        ,          V,          p\        V 4      pVP                  WaV34      pVfO   \        V4      ^8”  d   V'       d   VP                  4        K  W3R lp\        P                  ! Wh^R7      pWtWaV3&   \!        WP4      p	\        P                  ! WW^V	R7      # )aœ  
Return (a,b)-cosh/sinh pseudo-derivative of a periodic sequence.

If ``x_j`` and ``y_j`` are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = -sqrt(-1)*cosh(j*a*2*pi/period)/sinh(j*b*2*pi/period) * x_j
  y_0 = 0

Parameters
----------
x : array_like
    The array to take the pseudo-derivative from.
a, b : float
    Defines the parameters of the cosh/sinh pseudo-differential
    operator.
period : float, optional
    The period of the sequence. Default period is ``2*pi``.

Returns
-------
cs_diff : ndarray
    Pseudo-derivative of periodic sequence `x`.

Notes
-----
For even len(`x`), the Nyquist mode of `x` is taken as zero.

Úcs_diff_cacher   c                 óf   € V '       d)   \        W,          4      ) \        W ,          4      ,          # ^ # r   )r   r   ©r   ÚaÚbs   &&&r   r   Úcs_diff.<locals>.kernelH  s!   € ßÜ˜Q�S›	�z¤$ q¥s£)Õ+Ð+Ùr   r9   r   )r!   r"   r#   r$   rK   r   r	   Úcs_diffr&   r'   r   r(   r)   r*   r
   r+   r   ©
r,   rN   rO   r-   r.   r/   r0   r1   r   r    s
   &&&&&     r   rQ   rQ     s  € ô< �&œ)Ÿ/™/×*Ò*Ü�v˜×/Ò/Ø#%ˆFÔ Ø×%Ñ%ˆä
�!‹*€CÜ�C×ÒÜ�s—x‘x  vÓ6Ø”'˜#Ÿ(™( A¨&Ó9Õ9õ:ð 	:àÒØˆa�C”�F�6�MˆØˆa�C”�F�6�MˆÜˆA‹€AØ�J‰J˜˜A�wÓ€EØ‚}Üˆv‹;˜ÔßØ—‘Ö àô 	ô ×0Ò0°¸AÔ>ˆØ��Aˆw‰Ü˜cÓ%€KÜ×Ò˜S°aÀKÔPÐPr   c           	     óÔ  € \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WW44      R\        VP                  WW44      ,          ,           # Ve7   V^,          \        ,          V,          pV^,          \        ,          V,          p\        V 4      pVP                  WaV34      pVfO   \        V4      ^8”  d   V'       d   VP                  4        K  W3R lp\        P                  ! Wh^R7      pWtWaV3&   \!        WP4      p	\        P                  ! WW^V	R7      # )a<  
Return (a,b)-sinh/cosh pseudo-derivative of a periodic sequence x.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = sqrt(-1)*sinh(j*a*2*pi/period)/cosh(j*b*2*pi/period) * x_j
  y_0 = 0

Parameters
----------
x : array_like
    Input array.
a,b : float
    Defines the parameters of the sinh/cosh pseudo-differential
    operator.
period : float, optional
    The period of the sequence x. Default is 2*pi.

Notes
-----
``sc_diff(cs_diff(x,a,b),b,a) == x``
For even ``len(x)``, the Nyquist mode of x is taken as zero.

Úsc_diff_cacher   c                 ód   € V '       d(   \        W,          4      \        W ,          4      ,          # ^ # r   )r   r   rM   s   &&&r   r   Úsc_diff.<locals>.kernel  s   € ßÜ˜A�C“y¤ a¥c£Õ*Ð*Ùr   r9   r   )r!   r"   r#   r$   rT   r   r	   Úsc_diffr&   r'   r   r(   r)   r*   r
   r+   r   rR   s
   &&&&&     r   rW   rW   R  s  € ô4 �&œ)Ÿ/™/×*Ò*Ü�v˜×/Ò/Ø#%ˆFÔ Ø×%Ñ%ˆä
�!‹*€CÜ�C×ÒÜ�s—x‘x  vÓ6Ø”G˜CŸH™H a¨FÓ;Õ;õ<ð 	<àÒØˆa�C”�F�6�MˆØˆa�C”�F�6�MˆÜˆA‹€AØ�J‰J˜˜A�wÓ€EØ‚}Üˆv‹;˜ÔßØ—‘Ö àô 	ô ×0Ò0°¸AÔ>ˆØ��Aˆw‰Ü˜cÓ%€KÜ×Ò˜S°aÀKÔPÐPr   c           	     óÎ  € \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WW44      R\        VP                  WW44      ,          ,           # Ve7   V^,          \        ,          V,          pV^,          \        ,          V,          p\        V 4      pVP                  WaV34      pVfM   \        V4      ^8”  d   V'       d   VP                  4        K  W3R lp\        P                  ! Wh4      pWtWaV3&   \!        WP4      p	\        P                  ! WWV	R7      # )a  
Return (a,b)-sinh/sinh pseudo-derivative of a periodic sequence x.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = sinh(j*a*2*pi/period)/sinh(j*b*2*pi/period) * x_j
  y_0 = a/b * x_0

Parameters
----------
x : array_like
    The array to take the pseudo-derivative from.
a,b
    Defines the parameters of the sinh/sinh pseudo-differential
    operator.
period : float, optional
    The period of the sequence x. Default is ``2*pi``.

Notes
-----
``ss_diff(ss_diff(x,a,b),b,a) == x``

Úss_diff_cacher   c                 ó„   € V '       d(   \        W,          4      \        W ,          4      ,          # \        V4      V,          # ©N)r   ÚfloatrM   s   &&&r   r   Úss_diff.<locals>.kernelµ  s*   € ßÜ˜A�C“y¤ a¥c£Õ*Ð*Ü˜“8˜A•:Ðr   ©r    )r!   r"   r#   r$   rY   r   r	   Úss_diffr&   r'   r   r(   r)   r*   r
   r+   r   rR   s
   &&&&&     r   r_   r_   ‰  s  € ô2 �&œ)Ÿ/™/×*Ò*Ü�v˜×/Ò/Ø#%ˆFÔ Ø×%Ñ%ˆä
�!‹*€CÜ�C×ÒÜ�s—x‘x  vÓ6Ø”'˜#Ÿ(™( A¨&Ó9Õ9õ:ð 	:àÒØˆa�C”�F�6�MˆØˆa�C”�F�6�MˆÜˆA‹€AØ�J‰J˜˜A�wÓ€EØ‚}Üˆv‹;˜ÔßØ—‘Ö àô 	ô ×0Ò0°Ó:ˆØ��Aˆw‰Ü˜cÓ%€KÜ×Ò˜S°;Ô?Ð?r   c           	     óÎ  € \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WW44      R\        VP                  WW44      ,          ,           # Ve7   V^,          \        ,          V,          pV^,          \        ,          V,          p\        V 4      pVP                  WaV34      pVfM   \        V4      ^8”  d   V'       d   VP                  4        K  W3R lp\        P                  ! Wh4      pWtWaV3&   \!        WP4      p	\        P                  ! WWV	R7      # )ab  
Return (a,b)-cosh/cosh pseudo-derivative of a periodic sequence.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = cosh(j*a*2*pi/period)/cosh(j*b*2*pi/period) * x_j

Parameters
----------
x : array_like
    The array to take the pseudo-derivative from.
a,b : float
    Defines the parameters of the sinh/sinh pseudo-differential
    operator.
period : float, optional
    The period of the sequence x. Default is ``2*pi``.

Returns
-------
cc_diff : ndarray
    Pseudo-derivative of periodic sequence `x`.

Notes
-----
``cc_diff(cc_diff(x,a,b),b,a) == x``

Úcc_diff_cacher   c                 óP   € \        W,          4      \        W ,          4      ,          # r[   )r   rM   s   &&&r   r   Úcc_diff.<locals>.kernelï  s   € Ü˜�“9œT !¥#›YÕ&Ð&r   r^   )r!   r"   r#   r$   ra   r   r	   Úcc_diffr&   r'   r   r(   r)   r*   r
   r+   r   rR   s
   &&&&&     r   rd   rd   ¿  s  € ô: �&œ)Ÿ/™/×*Ò*Ü�v˜×/Ò/Ø#%ˆFÔ Ø×%Ñ%ˆä
�!‹*€CÜ�C×ÒÜ�s—x‘x  vÓ6Ø”G˜CŸH™H a¨FÓ;Õ;õ<ð 	<àÒØˆa�C”�F�6�MˆØˆa�C”�F�6�MˆÜˆA‹€AØ�J‰J˜˜A�wÓ€EØ‚}Üˆv‹;˜ÔßØ—‘Ö àô 	'ä×0Ò0°Ó:ˆØ��Aˆw‰Ü˜cÓ%€KÜ×Ò˜S°;Ô?Ð?r   c                óè  € \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WV4      R\        VP                  WV4      ,          ,           # Ve   V^,          \        ,          V,          p\        V 4      pVP                  WQ34      pVfq   \        V4      ^8”  d   V'       d   VP                  4        K  V3R lpV3R lp\        P                  ! WW^ ^ R7      p	\        P                  ! WX^^ R7      p
Wš3W5V3&   MVw  rš\!        W@4      p\        P"                  ! WIV
VR7      # )a¾  
Shift periodic sequence x by a: y(u) = x(u+a).

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

      y_j = exp(j*a*2*pi/period*sqrt(-1)) * x_f

Parameters
----------
x : array_like
    The array to take the pseudo-derivative from.
a : float
    Defines the parameters of the sinh/sinh pseudo-differential
period : float, optional
    The period of the sequences x and y. Default period is ``2*pi``.
Úshift_cacher   c                 ó$   € \        W,          4      # r[   )r   ©r   rN   s   &&r   Úkernel_realÚshift.<locals>.kernel_real  ó   € Ü�q•s“8ˆOr   c                 ó$   € \        W,          4      # r[   )r   rh   s   &&r   Úkernel_imagÚshift.<locals>.kernel_imag  rk   r   r   r^   )r!   r"   r#   r$   rf   r   r	   Úshiftr&   r'   r   r(   r)   r*   r
   r+   r   Ú
convolve_z)r,   rN   r-   r.   r/   r0   r1   ri   rm   Ú
omega_realÚ
omega_imagr    s   &&&&        r   ro   ro   ÷  sF  € ô$ �&œ)Ÿ/™/×*Ò*Ü�v˜}×-Ò-Ø!#ˆFÔØ×#Ñ#ˆä
�!‹*€CÜ�C×ÒÜ�S—X‘X˜q¨&Ó1°B¼Ø�H‰H�a ó:)õ 5)õ )ð 	)àÒØˆa�C”�F�6�MˆÜˆA‹€AØ�J‰J˜�uÓ€EØ‚}Üˆv‹;˜ÔßØ—‘Ö àô 	ð ô 	ä×5Ò5°aÀaØCDôFˆ
ä×5Ò5°aÀaØCDôFˆ
à"Ð-ˆ�!ˆuŠà %Ñˆ
Ü˜cÓ%€KÜ×Ò˜s¨jØ+6ô8ð 8r   )
r%   r:   r@   rF   rI   rQ   rd   rW   r_   ro   )Ú__doc__Ú__all__r"   Únumpyr   r   r   r   r   r   r   r	   Ú r
   Úscipy.fft._pocketfft.helperr   r#   r.   r%   r:   r@   rF   rI   rQ   rW   r_   rd   ro   rD   r   r   Ú<module>rx      s¹   ðñò
€ó
 ç G× GÓ GÝ å 3ð 
�ŠÓ	€ð ˜$ vô <6ð~  fô BQðJ  Vô &QðR ô ?QðD ô ð$ !¨ô 8Qðv !¨ô 4Qðn !¨ô 3@ðl !¨ô 5@ðp  Fö 28r   