def smooth(array, points, deg):
    'Smooth an array.\n\n    Args:\n        array (:class:`numpy.ndarray`): Input array.\n        points (int): Points of smoothing.\n        deg (int): Degree of smoothing.\n\n    Returns:\n        :class:`numpy.ndarray`: smoothed array\n\n    '
    n = array.size
    if (points == 5):
        if (deg == 2):
            w_2 = (np.array([31.0, 9.0, (- 3.0), (- 5.0), 3.0]) / 35.0)
            w_1 = (np.array([9.0, 13.0, 12.0, 6.0, (- 5.0)]) / 35.0)
            w_0 = (np.array([(- 3.0), 12.0, 17.0, 12.0, (- 3.0)]) / 35.0)
        elif (deg == 3):
            w_2 = (np.array([69.0, 4.0, (- 6.0), 4.0, (- 1.0)]) / 70.0)
            w_1 = (np.array([2.0, 27.0, 12.0, (- 8.0), 2.0]) / 35.0)
            w_0 = (np.array([(- 3.0), 12.0, 17.0, 12.0, (- 3.0)]) / 35.0)
        a = np.zeros((n, n))
        a[0, 0:5] = w_2
        a[1, 0:5] = w_1
        for i in np.arange(2, (n - 2)):
            a[i, (i - 2):(i + 3)] = w_0
        a[(- 2), (- 5):] = w_1[::(- 1)]
        a[(- 1), (- 5):] = w_2[::(- 1)]
    result = (np.matrix(a) * np.matrix(array.reshape((- 1), 1)))
    return np.array(result)[:, 0]
Smooth an array.

Args:
    array (:class:`numpy.ndarray`): Input array.
    points (int): Points of smoothing.
    deg (int): Degree of smoothing.

Returns:
    :class:`numpy.ndarray`: smoothed array
def smooth(array, points, deg):
    'Smooth an array.\n\n    Args:\n        array (:class:`numpy.ndarray`): Input array.\n        points (int): Points of smoothing.\n        deg (int): Degree of smoothing.\n\n    Returns:\n        :class:`numpy.ndarray`: smoothed array\n\n    '
    n = array.size
    if (points == 5):
        if (deg == 2):
            w_2 = (np.array([31.0, 9.0, (- 3.0), (- 5.0), 3.0]) / 35.0)
            w_1 = (np.array([9.0, 13.0, 12.0, 6.0, (- 5.0)]) / 35.0)
            w_0 = (np.array([(- 3.0), 12.0, 17.0, 12.0, (- 3.0)]) / 35.0)
        elif (deg == 3):
            w_2 = (np.array([69.0, 4.0, (- 6.0), 4.0, (- 1.0)]) / 70.0)
            w_1 = (np.array([2.0, 27.0, 12.0, (- 8.0), 2.0]) / 35.0)
            w_0 = (np.array([(- 3.0), 12.0, 17.0, 12.0, (- 3.0)]) / 35.0)
        a = np.zeros((n, n))
        a[0, 0:5] = w_2
        a[1, 0:5] = w_1
        for i in np.arange(2, (n - 2)):
            a[i, (i - 2):(i + 3)] = w_0
        a[(- 2), (- 5):] = w_1[::(- 1)]
        a[(- 1), (- 5):] = w_2[::(- 1)]
    result = (np.matrix(a) * np.matrix(array.reshape((- 1), 1)))
    return np.array(result)[:, 0]