




import doctest
from collections import deque

import numpy as np







class __snake_case			:







   def __init__(      self		:						int):

        """simple docstring"""


        UpperCAmelCase_          =							[2, 1, 2, -1]
        UpperCAmelCase_          =							[1, 2, 3, 4]







   def lowerCamelCase						(      self		:						Union[str, Any]):

        """simple docstring"""


        UpperCAmelCase_          =							len(self.first_signal)
        UpperCAmelCase_          =							len(self.second_signal)

        UpperCAmelCase_          =							max(_snake_case					,						_snake_case)

        # create a zero matrix of max_length x max_length
        UpperCAmelCase_          =							[[0] * max_length for i in range(_snake_case)]

        # fills the smaller signal with zeros to make both signals of same length
        if length_first_signal < length_second_signal:
             self.first_signal += [0] * (max_length - length_first_signal)
        elif length_first_signal > length_second_signal:
             self.second_signal += [0] * (max_length - length_second_signal)
        for i in range(_snake_case):
             UpperCAmelCase_          =							deque(self.second_signal)
             rotated_signal.rotate(_snake_case)
             for j, item in enumerate(_snake_case):
                  matrix[i][j] += item

        # multiply the matrix with the first signal
        UpperCAmelCase_          =							np.matmul(np.transpose(_snake_case)					,						np.transpose(self.first_signal))

        # rounding-off to two decimal places
        return [round(_snake_case					,						2) for i in final_signal]


if __name__ == "__main__":
    doctest.testmod()












def    A						(__A   :    list   ,				__A   :    int   ,				__A   :    int = 0   ,				__A   :    int = 0       )   ->      int:







     """simple docstring"""


     UpperCAmelCase_          =							right or len(__A       ) - 1
     if left > right:
          return -1
     elif list_data[left] == key:
          return left
     elif list_data[right] == key:
          return right
     else:
          return search(__A   ,				__A   ,				left + 1   ,				right - 1       )


if __name__ == "__main__":
    import doctest

    doctest.testmod()






