403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/scipy/signal/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/scipy/signal/__pycache__/_bsplines.cpython-311.pyc
�

d�c)M���ddlmZmZmZmZmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZmZmZmZmZmZmZddlmZmZddlmZddlmZgd�Zdd	�ZiZd
�Z d�Z!d�Z"d
�Z#d�Z$d�Z%d�Z&d�Z'd�Z(d�Z)d�Z*dd�Z+dd�Z,dd�Z-dd�Z.dS)�)�logical_and�asarray�pi�
zeros_like�	piecewise�array�arctan2�tan�zeros�arange�floor)	�sqrt�exp�greater�less�cos�add�sin�
less_equal�
greater_equal�)�	cspline2d�sepfir2d)�comb)�float_factorial)	�
spline_filter�bspline�gauss_spline�cubic�	quadratic�	cspline1d�	qspline1d�cspline1d_eval�qspline1d_eval�@c���|jj}tgd�d��dz}|dvr}|�d��}t	|j|��}t	|j|��}t|||��}t|||��}|d|zz�|��}nJ|dvr7t	||��}t|||��}|�|��}ntd���|S)	a3Smoothing spline (cubic) filtering of a rank-2 array.

    Filter an input data set, `Iin`, using a (cubic) smoothing spline of
    fall-off `lmbda`.

    Parameters
    ----------
    Iin : array_like
        input data set
    lmbda : float, optional
        spline smooghing fall-off value, default is `5.0`.

    Returns
    -------
    res : ndarray
        filterd input data

    Examples
    --------
    We can filter an multi dimentional signal (ex: 2D image) using cubic
    B-spline filter:

    >>> import numpy as np
    >>> from scipy.signal import spline_filter
    >>> import matplotlib.pyplot as plt
    >>> orig_img = np.eye(20)  # create an image
    >>> orig_img[10, :] = 1.0
    >>> sp_filter = spline_filter(orig_img, lmbda=0.1)
    >>> f, ax = plt.subplots(1, 2, sharex=True)
    >>> for ind, data in enumerate([[orig_img, "original image"],
    ...                             [sp_filter, "spline filter"]]):
    ...     ax[ind].imshow(data[0], cmap='gray_r')
    ...     ax[ind].set_title(data[1])
    >>> plt.tight_layout()
    >>> plt.show()

    )��?g@r'�f�@)�F�Dr*y�?)r(�dzInvalid data type for Iin)	�dtype�charr�astyper�real�imagr�	TypeError)	�Iin�lmbda�intype�hcol�ckr�cki�outr�outi�outs	         �8/usr/lib/python3/dist-packages/scipy/signal/_bsplines.pyrrs���L�Y�^�F�����#�&�&��,�D�
�����j�j��o�o�����%�(�(�����%�(�(����T�4�(�(����T�4�(�(���b�4�i��'�'��/�/���	�:�	�	���U�#�#���s�D�$�'�'���j�j�� � ����3�4�4�4��J�c	������	�	t�S#t$rYnwxYwd�}�dzdz}�dzrd}nd}|dd|��g}|�td|dz
��D]*}|�|d��dz
�����dz
��+|�|dd�dzdz����t	�������fd��	�	fd	�t|��D��}||ft�<||fS)
a�Returns the function defined over the left-side pieces for a bspline of
    a given order.

    The 0th piece is the first one less than 0. The last piece is a function
    identical to 0 (returned as the constant 0). (There are order//2 + 2 total
    pieces).

    Also returns the condition functions that when evaluated return boolean
    arrays for use with `numpy.piecewise`.
    c�@���|dkr��fd�S|dkr�fd�S��fd�S)Nrc�\��tt|���t|�����S�N)rrr��x�val1�val2s ��r<�<lambda>z>_bspline_piecefunctions.<locals>.condfuncgen.<locals>.<lambda>]s,���[��A�t�)<�)<�)6�q�$�)?�)?�A�A�r=�c�$��t|���SrA)r)rCrEs �r<rFz>_bspline_piecefunctions.<locals>.condfuncgen.<locals>.<lambda>`s���Z��4�0�0�r=c�\��tt|���t|�����SrA)rrrrBs ��r<rFz>_bspline_piecefunctions.<locals>.condfuncgen.<locals>.<lambda>bs*���[��a����)6�q�$�)?�)?�A�A�r=�)�numrDrEs ``r<�condfuncgenz,_bspline_piecefunctions.<locals>.condfuncgen[sm�����!�8�8�A�A�A�A�A�
A�
�A�X�X�0�0�0�0�0�A�A�A�A�A�
Ar=rGg�g�rr�@c�������dz|z
��dkrdS��fd�t�dz��D����fd�t�dz��D�������fd�}|S)NrGrc
�r��g|]3}dd|dzzz
tt�dz|d�����z�z��4S)rrG)�exact)�floatr)�.0�k�fval�orders  ��r<�
<listcomp>zA_bspline_piecefunctions.<locals>.piecefuncgen.<locals>.<listcomp>}sZ���*�*�*���q�A��E�{�?�e�D����A�Q�,G�,G�,G�&H�&H�H�4�O�*�*�*r=rc���g|]}�|z
��	SrJrJ)rRrS�bounds  �r<rVzA_bspline_piecefunctions.<locals>.piecefuncgen.<locals>.<listcomp>s���4�4�4��5�&�1�*�4�4�4r=c�j��d}t�dz��D]}|�||�|z�zzz
}�|S)N�r��range)rC�resrS�Mk�coeffsrU�shiftss   ����r<�thefuncz>_bspline_piecefunctions.<locals>.piecefuncgen.<locals>.thefunc�sH����C��2��6�]�]�
<�
<���v�a�y�A��q�	�M�e�#;�;�;����Jr=r[)rKrar^r_r`rXrTrUs  @@@���r<�piecefuncgenz-_bspline_piecefunctions.<locals>.piecefuncgenys�������
�a�Z�#�
����F�F��1�*�*�*�*�*� ��a��=�=�*�*�*��4�4�4�4�e�B��F�m�m�4�4�4��	�	�	�	�	�	�	�	�
�r=c�&��g|]
}�|����SrJrJ)rRrSrbs  �r<rVz+_bspline_piecefunctions.<locals>.<listcomp>�s!���5�5�5�A���Q���5�5�5r=)�_splinefunc_cache�KeyErrorr\�appendr)
rUrL�last�
startbound�	condfuncsrK�funclistrXrTrbs
`      @@@r<�_bspline_piecefunctionsrkKss������
� ��'�'���
�
�
���
����A�A�A��A�:��>�D��q�y���
�
��
���Q��:�.�.�/�I��E��Q��q��!�!���������Q��u�q�y�9�9�:�:�:���	���
���[�[��A����|�c�'9�:�:�;�;�;��5�!�!�D�
�
�
�
�
�
�
�6�5�5�5��t���5�5�5�H� (�)�4��e���Y��s��
 � c���tt|�����t|��\}}�fd�|D��}t�||��S)awB-spline basis function of order n.

    Parameters
    ----------
    x : array_like
        a knot vector
    n : int
        The order of the spline. Must be non-negative, i.e., n >= 0

    Returns
    -------
    res : ndarray
        B-spline basis function values

    See Also
    --------
    cubic : A cubic B-spline.
    quadratic : A quadratic B-spline.

    Notes
    -----
    Uses numpy.piecewise and automatic function-generator.

    Examples
    --------
    We can calculate B-Spline basis function of several orders:

    >>> import numpy as np
    >>> from scipy.signal import bspline, cubic, quadratic
    >>> bspline(0.0, 1)
    1

    >>> knots = [-1.0, 0.0, -1.0]
    >>> bspline(knots, 2)
    array([0.125, 0.75, 0.125])

    >>> np.array_equal(bspline(knots, 2), quadratic(knots))
    True

    >>> np.array_equal(bspline(knots, 3), cubic(knots))
    True

    c�&��g|]
}|�����SrJrJ)rR�func�axs  �r<rVzbspline.<locals>.<listcomp>�s!���/�/�/�T���R���/�/�/r=)�absrrkr)rC�nrjri�condlistros     @r<rr�sW���X�g�a�j�j�/�/�	�B�1�!�4�4��H�i�/�/�/�/�Y�/�/�/�H��R��8�,�,�,r=c��t|��}|dzdz}dtdtz|z��zt|dzdz|z��zS)a�Gaussian approximation to B-spline basis function of order n.

    Parameters
    ----------
    x : array_like
        a knot vector
    n : int
        The order of the spline. Must be non-negative, i.e., n >= 0

    Returns
    -------
    res : ndarray
        B-spline basis function values approximated by a zero-mean Gaussian
        function.

    Notes
    -----
    The B-spline basis function can be approximated well by a zero-mean
    Gaussian function with standard-deviation equal to :math:`\sigma=(n+1)/12`
    for large `n` :

    .. math::  \frac{1}{\sqrt {2\pi\sigma^2}}exp(-\frac{x^2}{2\sigma})

    References
    ----------
    .. [1] Bouma H., Vilanova A., Bescos J.O., ter Haar Romeny B.M., Gerritsen
       F.A. (2007) Fast and Accurate Gaussian Derivatives Based on B-Splines. In:
       Sgallari F., Murli A., Paragios N. (eds) Scale Space and Variational
       Methods in Computer Vision. SSVM 2007. Lecture Notes in Computer
       Science, vol 4485. Springer, Berlin, Heidelberg
    .. [2] http://folk.uio.no/inf3330/scripting/doc/python/SciPy/tutorial/old/node24.html

    Examples
    --------
    We can calculate B-Spline basis functions approximated by a gaussian
    distribution:

    >>> import numpy as np
    >>> from scipy.signal import gauss_spline, bspline
    >>> knots = np.array([-1.0, 0.0, -1.0])
    >>> gauss_spline(knots, 3)
    array([0.15418033, 0.6909883, 0.15418033])  # may vary

    >>> bspline(knots, 3)
    array([0.16666667, 0.66666667, 0.16666667])  # may vary

    rg(@rG)rrrr)rCrq�signsqs   r<rr�sT��`	��
�
�A��!�e�t�^�F��t�A��F�V�O�$�$�$�s�A��F�7�Q�;��+?�'@�'@�@�@r=c�X�tt|����}t|��}t|d��}|���r||}dd|dzzd|z
zz
||<|t|d��z}|���r||}dd|z
dzz||<|S)a-A cubic B-spline.

    This is a special case of `bspline`, and equivalent to ``bspline(x, 3)``.

    Parameters
    ----------
    x : array_like
        a knot vector

    Returns
    -------
    res : ndarray
        Cubic B-spline basis function values

    See Also
    --------
    bspline : B-spline basis function of order n
    quadratic : A quadratic B-spline.

    Examples
    --------
    We can calculate B-Spline basis function of several orders:

    >>> import numpy as np
    >>> from scipy.signal import bspline, cubic, quadratic
    >>> bspline(0.0, 1)
    1

    >>> knots = [-1.0, 0.0, -1.0]
    >>> bspline(knots, 2)
    array([0.125, 0.75, 0.125])

    >>> np.array_equal(bspline(knots, 2), quadratic(knots))
    True

    >>> np.array_equal(bspline(knots, 3), cubic(knots))
    True

    rgUUUUUU�?��?rGgUUUUUU�?��rprrr�any�rCror]�cond1�ax1�cond2�ax2s       r<rr�s���P

�W�Q�Z�Z���B�
�R�.�.�C���Q�K�K�E��y�y�{�{�>���i���w����1�Q��W�=�=��E�
�
�F�T�"�a�[�[� �E��y�y�{�{�.���i����C��A�~�-��E�
��Jr=c�F�tt|����}t|��}t|d��}|���r||}d|dzz
||<|t|d��z}|���r||}|dz
dzdz||<|S)a-A quadratic B-spline.

    This is a special case of `bspline`, and equivalent to ``bspline(x, 2)``.

    Parameters
    ----------
    x : array_like
        a knot vector

    Returns
    -------
    res : ndarray
        Quadratic B-spline basis function values

    See Also
    --------
    bspline : B-spline basis function of order n
    cubic : A cubic B-spline.

    Examples
    --------
    We can calculate B-Spline basis function of several orders:

    >>> import numpy as np
    >>> from scipy.signal import bspline, cubic, quadratic
    >>> bspline(0.0, 1)
    1

    >>> knots = [-1.0, 0.0, -1.0]
    >>> bspline(knots, 2)
    array([0.125, 0.75, 0.125])

    >>> np.array_equal(bspline(knots, 2), quadratic(knots))
    True

    >>> np.array_equal(bspline(knots, 3), cubic(knots))
    True

    rvg�?rG��?rMrxrzs       r<r r ,s���P

�W�Q�Z�Z���B�
�R�.�.�C���S�M�M�E��y�y�{�{�%���i���C�1�H�_��E�
�
�F�T�"�c�]�]�"�E��y�y�{�{�,���i���C�i�A�%��+��E�
��Jr=c
�V�dd|zz
d|ztdd|zz��zz}ttd|zdz
��t|����}d|zdz
t|��z
d|zz}|td|zd|ztdd|zz��zz|z��z}||fS)Nr�`�rw��0)rr	)�lam�xi�omeg�rhos    r<�
_coeff_smoothr�as���	
�R�#�X���S��4��C�#�I�
�#6�#6�6�	6�B��4��c�	�A�
�&�&��R���1�1�D�
��8�a�<�$�r�(�(�"�r�C�x�
0�C�

��b�3�h��c��D��S�3�Y��,?�,?�!?�?�2�E�F�F�
F�C���9�r=c��|t|��z||zzt||dzz��zt|d��zS)Nr���)rr)rS�csr��omegas    r<�_hcr�isB����U���O�s�a�x�(�3�u��A���+?�+?�?��A�r�N�N�
�r=c�<�||zd||zzzd||zz
zdd|z|ztd|z��zz
|dzzz}d||zz
d||zzzt|��z}t|��}|||zzt||z��|t||z��zzzS)NrrG�)rr
rpr)rSr�r�r��c0�gamma�aks       r<�_hsr�ns���
�r�'�Q��s��]�
#�q�3��9�}�
5��q�3�w��}�s�1�u�9�~�~�-�-��q��8�:�B�
��s��]�q�3��9�}�-��E�
�
�:�E�	�Q���B�
��r�	�>�S����_�_�u�s�5�2�:���/F�F�G�Gr=c	��t|��\}}dd|zt|��zz
||zz}t|��}t|f|jj��}t
|��}td|||��|dztj	t|dz|||��|z��z|d<td|||��|dztd|||��|dzztj	t|dz|||��|z��z|d<td|��D]D}|||zd|zt|��z||dz
zz||z||dz
zz
||<�Et|f|jj��}	tj	t||||��t|dz|||��z|ddd�z��|	|dz
<tj	t|dz
|||��t|dz|||��z|ddd�z��|	|dz
<t|dz
dd��D]D}|||zd|zt|��z|	|dzzz||z|	|dzzz
|	|<�E|	S)NrrGrr�rw)r�r�lenrr-r.rr�r�reducer\r�)
�signal�lambr�r�r��K�yprSrq�ys
          r<�_cubic_smooth_coeffr�vs����t�$�$�J�C��	
�Q��W�s�5�z�z�
!�	!�C�#�I�	-�B��F���A�	��t�V�\�&�	'�	'�B��q�	�	�A�
��B��U�
#�
#�f�Q�i�
/�
�Z��A��E�2�s�E�2�2�V�;�
<�
<�=�B�q�E���B��U�
#�
#�f�Q�i�
/�
��B��U�
#�
#�f�Q�i�
/�0�
�Z��A��E�2�s�E�2�2�V�;�
<�
<�=�B�q�E��1�a�[�[�(�(���f�Q�i��!�c�'�C��J�J�"6��A��E��"B�B��s��R��A��Y�&�'��1���	�q�d�F�L�%�&�&�A��z�3�q�"�c�5�1�1��q�1�u�b�#�u�5�5�6�9?���"���F�G�G�A�a�!�e�H��z�3�q�1�u�b�#�u�5�5��q�1�u�b�#�u�5�5�6�9?���"���F�G�G�A�a�!�e�H��1�q�5�"�b�
!�
!�&�&���R��U�
�Q��W�s�5�z�z�1�A�a�!�e�H�<�<��c�	�A�a�!�e�H�$�%��!���
�Hr=c��dtd��z}t|��}t|f|jj��}|t|��z}|d|t
j||z��zz|d<td|��D]}|||||dz
zz||<�t|f|j��}||dz
z||dz
z||dz
<t|dz
dd��D]}|||dz||z
z||<�|dzS)N���rwrrrGr�r)�	rr�rr-r.rrr�r\�r��zir��yplus�powersrS�outputs       r<�_cubic_coeffr��s��	�d�1�g�g��B��F���A��1�$���)�*�*�E�
�6�!�9�9�_�F��a�y�2��
�6�F�?� ;� ;�;�;�E�!�H�
�1�a�[�[�1�1���!�9�r�E�!�a�%�L�0�0��a���
�A�4���
&�
&�F��"�q�&�M�E�!�a�%�L�0�F�1�q�5�M�
�1�q�5�"�b�
!�
!�4�4���&��Q��-�%��(�2�3��q�	�	��C�<�r=c� �ddtd��zz}t|��}t|f|jj��}|t|��z}|d|t
j||z��zz|d<td|��D]}|||||dz
zz||<�t|f|jj��}||dz
z||dz
z||dz
<t|dz
dd��D]}|||dz||z
z||<�|dzS)N���rGrMrrr�g @r�r�s       r<�_quadratic_coeffr��s%��	�a�$�s�)�)�m�	�B��F���A��1�$���)�*�*�E�
�6�!�9�9�_�F��a�y�2��
�6�F�?� ;� ;�;�;�E�!�H�
�1�a�[�[�1�1���!�9�r�E�!�a�%�L�0�0��a���
�A�4���*�
+�
+�F��"�q�&�M�E�!�a�%�L�0�F�1�q�5�M�
�1�q�5�"�b�
!�
!�4�4���&��Q��-�%��(�2�3��q�	�	��C�<�r=rZc�L�|dkrt||��St|��S)a
    Compute cubic spline coefficients for rank-1 array.

    Find the cubic spline coefficients for a 1-D signal assuming
    mirror-symmetric boundary conditions. To obtain the signal back from the
    spline representation mirror-symmetric-convolve these coefficients with a
    length 3 FIR window [1.0, 4.0, 1.0]/ 6.0 .

    Parameters
    ----------
    signal : ndarray
        A rank-1 array representing samples of a signal.
    lamb : float, optional
        Smoothing coefficient, default is 0.0.

    Returns
    -------
    c : ndarray
        Cubic spline coefficients.

    See Also
    --------
    cspline1d_eval : Evaluate a cubic spline at the new set of points.

    Examples
    --------
    We can filter a signal to reduce and smooth out high-frequency noise with
    a cubic spline:

    >>> import numpy as np
    >>> import matplotlib.pyplot as plt
    >>> from scipy.signal import cspline1d, cspline1d_eval
    >>> rng = np.random.default_rng()
    >>> sig = np.repeat([0., 1., 0.], 100)
    >>> sig += rng.standard_normal(len(sig))*0.05  # add noise
    >>> time = np.linspace(0, len(sig))
    >>> filtered = cspline1d_eval(cspline1d(sig), time)
    >>> plt.plot(sig, label="signal")
    >>> plt.plot(time, filtered, label="filtered")
    >>> plt.legend()
    >>> plt.show()

    rZ)r�r��r�r�s  r<r!r!�s,��X�s�{�{�"�6�4�0�0�0��F�#�#�#r=c�J�|dkrtd���t|��S)aFCompute quadratic spline coefficients for rank-1 array.

    Parameters
    ----------
    signal : ndarray
        A rank-1 array representing samples of a signal.
    lamb : float, optional
        Smoothing coefficient (must be zero for now).

    Returns
    -------
    c : ndarray
        Quadratic spline coefficients.

    See Also
    --------
    qspline1d_eval : Evaluate a quadratic spline at the new set of points.

    Notes
    -----
    Find the quadratic spline coefficients for a 1-D signal assuming
    mirror-symmetric boundary conditions. To obtain the signal back from the
    spline representation mirror-symmetric-convolve these coefficients with a
    length 3 FIR window [1.0, 6.0, 1.0]/ 8.0 .

    Examples
    --------
    We can filter a signal to reduce and smooth out high-frequency noise with
    a quadratic spline:

    >>> import numpy as np
    >>> import matplotlib.pyplot as plt
    >>> from scipy.signal import qspline1d, qspline1d_eval
    >>> rng = np.random.default_rng()
    >>> sig = np.repeat([0., 1., 0.], 100)
    >>> sig += rng.standard_normal(len(sig))*0.05  # add noise
    >>> time = np.linspace(0, len(sig))
    >>> filtered = qspline1d_eval(qspline1d(sig), time)
    >>> plt.plot(sig, label="signal")
    >>> plt.plot(time, filtered, label="filtered")
    >>> plt.legend()
    >>> plt.show()

    rZz.Smoothing quadratic splines not supported yet.)�
ValueErrorr�r�s  r<r"r"�s+��Z�s�{�{��I�J�J�J���'�'�'r=r'c��t|��|z
t|��z}t||j���}|jdkr|St|��}|dk}||dz
k}||z}t
|||��||<t
|d|dz
z||z
��||<||}|jdkr|St||j���}	t|dz
���t��dz}
td��D]>}|
|z}|�d|dz
��}
|	||
t||z
��zz
}	�?|	||<|S)a�Evaluate a cubic spline at the new set of points.

    `dx` is the old sample-spacing while `x0` was the old origin. In
    other-words the old-sample points (knot-points) for which the `cj`
    represent spline coefficients were at equally-spaced points of:

      oldx = x0 + j*dx  j=0...N-1, with N=len(cj)

    Edges are handled using mirror-symmetric boundary conditions.

    Parameters
    ----------
    cj : ndarray
        cublic spline coefficients
    newx : ndarray
        New set of points.
    dx : float, optional
        Old sample-spacing, the default value is 1.0.
    x0 : int, optional
        Old origin, the default value is 0.

    Returns
    -------
    res : ndarray
        Evaluated a cubic spline points.

    See Also
    --------
    cspline1d : Compute cubic spline coefficients for rank-1 array.

    Examples
    --------
    We can filter a signal to reduce and smooth out high-frequency noise with
    a cubic spline:

    >>> import numpy as np
    >>> import matplotlib.pyplot as plt
    >>> from scipy.signal import cspline1d, cspline1d_eval
    >>> rng = np.random.default_rng()
    >>> sig = np.repeat([0., 1., 0.], 100)
    >>> sig += rng.standard_normal(len(sig))*0.05  # add noise
    >>> time = np.linspace(0, len(sig))
    >>> filtered = cspline1d_eval(cspline1d(sig), time)
    >>> plt.plot(sig, label="signal")
    >>> plt.plot(time, filtered, label="filtered")
    >>> plt.legend()
    >>> plt.show()

    )r-rrrGr�)
rrQrr-�sizer�r#r
r/�intr\�clipr��cj�newx�dx�x0r]�Nr{r}�cond3�result�jlower�i�thisj�indjs              r<r#r#sa��d
�D�M�M�B��%��)�)�+�D�
�T���
*�
*�
*�C�
�x�1�}�}��
��B���A��1�H�E��A��E�N�E��e�m��E���T�%�[�L�1�1�C��J���A��Q��K�$�u�+�$=�>�>�C��J���;�D��y�A�~�~��
�
��B�H�
-�
-�
-�F�
�4�!�8�_�_�
#�
#�C�
(�
(�1�
,�F�
�1�X�X�1�1����
���z�z�!�Q��U�#�#���"�T�(�U�4�%�<�0�0�0�0����C��J��Jr=c�p�t|��|z
|z}t|��}|jdkr|St|��}|dk}||dz
k}||z}t	|||��||<t	|d|dz
z||z
��||<||}|jdkr|St|��}	t|dz
���t��dz}
td��D]>}|
|z}|�	d|dz
��}
|	||
t||z
��zz
}	�?|	||<|S)a�Evaluate a quadratic spline at the new set of points.

    Parameters
    ----------
    cj : ndarray
        Quadratic spline coefficients
    newx : ndarray
        New set of points.
    dx : float, optional
        Old sample-spacing, the default value is 1.0.
    x0 : int, optional
        Old origin, the default value is 0.

    Returns
    -------
    res : ndarray
        Evaluated a quadratic spline points.

    See Also
    --------
    qspline1d : Compute quadratic spline coefficients for rank-1 array.

    Notes
    -----
    `dx` is the old sample-spacing while `x0` was the old origin. In
    other-words the old-sample points (knot-points) for which the `cj`
    represent spline coefficients were at equally-spaced points of::

      oldx = x0 + j*dx  j=0...N-1, with N=len(cj)

    Edges are handled using mirror-symmetric boundary conditions.

    Examples
    --------
    We can filter a signal to reduce and smooth out high-frequency noise with
    a quadratic spline:

    >>> import numpy as np
    >>> import matplotlib.pyplot as plt
    >>> from scipy.signal import qspline1d, qspline1d_eval
    >>> rng = np.random.default_rng()
    >>> sig = np.repeat([0., 1., 0.], 100)
    >>> sig += rng.standard_normal(len(sig))*0.05  # add noise
    >>> time = np.linspace(0, len(sig))
    >>> filtered = qspline1d_eval(qspline1d(sig), time)
    >>> plt.plot(sig, label="signal")
    >>> plt.plot(time, filtered, label="filtered")
    >>> plt.legend()
    >>> plt.show()

    rrrGr�rw)rrr�r�r$r
r/r�r\r�r r�s              r<r$r$bsO��h
�D�M�M�B��"�$�D�
�T�
�
�C�
�x�1�}�}��
��B���A��1�H�E��A��E�N�E��e�m��E���T�%�[�L�1�1�C��J���A��Q��K�$�u�+�$=�>�>�C��J���;�D��y�A�~�~��
�
��
�
�F�
�4�#�:�
�
�
%�
%�c�
*�
*�Q�
.�F�
�1�X�X�5�5����
���z�z�!�Q��U�#�#���"�T�(�Y�t�e�|�4�4�4�4����C��J��Jr=N)r%)rZ)r'r)/�numpyrrrrrrr	r
rrr
�numpy.core.umathrrrrrrrrr�_splinerr�
scipy.specialr�scipy._lib._utilr�__all__rrdrkrrrr r�r�r�r�r�r�r!r"r#r$rJr=r<�<module>r�s���I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�)�(�(�(�(�(�(�(�������,�,�,�,�,�,�I�I�I��5�5�5�5�p��A�A�A�H0-�0-�0-�f2A�2A�2A�j2�2�2�j2�2�2�j������
H�H�H�
�
�
�>������/$�/$�/$�/$�d0(�0(�0(�0(�fG�G�G�G�TI�I�I�I�I�Ir=

Youez - 2016 - github.com/yon3zu
LinuXploit