"""simple docstring"""


from __future__ import annotations







def 					__a   (		A = 4      ):






					'''simple docstring'''



					lowercase__				 =							abs(lowercase_      ) or 4
					return [[1 + x + y * row_size for x in range(lowercase_      )] for y in range(lowercase_      )]







def 					__a   (		A      ):






					'''simple docstring'''



					return reverse_row(transpose(lowercase_      )      )
					# OR.. transpose(reverse_column(matrix))







def 					__a   (		A      ):






					'''simple docstring'''



					return reverse_row(reverse_column(lowercase_      )      )
					# OR.. reverse_column(reverse_row(matrix))







def 					__a   (		A      ):






					'''simple docstring'''



					return reverse_column(transpose(lowercase_      )      )
					# OR.. transpose(reverse_row(matrix))







def 					__a   (		A      ):






					'''simple docstring'''



					lowercase__				 =							[list(lowercase_      ) for x in zip(*lowercase_      )]
					return matrix







def 					__a   (		A      ):






					'''simple docstring'''



					lowercase__				 =							matrix[::-1]
					return matrix







def 					__a   (		A      ):






					'''simple docstring'''



					lowercase__				 =							[x[::-1] for x in matrix]
					return matrix







def 					__a   (		A      ):






					'''simple docstring'''



					for i in matrix:
										print(*lowercase_      )


if __name__ == "__main__":
	lowerCAmelCase_:					Dict     =					make_matrix()
	print("\norigin:\n")
	print_matrix(matrix)
	print("\nrotate 90 counterclockwise:\n")
	print_matrix(rotate_aa(matrix))

	lowerCAmelCase_:					Optional[Any]     =					make_matrix()
	print("\norigin:\n")
	print_matrix(matrix)
	print("\nrotate 180:\n")
	print_matrix(rotate_aaa(matrix))

	lowerCAmelCase_:					Optional[int]     =					make_matrix()
	print("\norigin:\n")
	print_matrix(matrix)
	print("\nrotate 270 counterclockwise:\n")
	print_matrix(rotate_aaa(matrix))





"""simple docstring"""


from typing import Any

import numpy as np







def 					__a   (		A      ):






     '''simple docstring'''



     return np.array_equal(A    ,				matrix.conjugate().T      )







def 					__a   (		A    ,				A      ):






     '''simple docstring'''



     lowercase__				 =							v.conjugate().T
     lowercase__				 =							v_star.dot(A      )
     assert isinstance(A    ,				np.ndarray      )
     return (v_star_dot.dot(A      )) / (v_star.dot(A      ))







def 					__a   (		):






     '''simple docstring'''



     lowercase__				 =							np.array([[2, 2 + 1j, 4], [2 - 1j, 3, 1j], [4, -1j, 1]]      )
     lowercase__				 =							np.array([[1], [2], [3]]      )
     assert is_hermitian(A      ), f'''{a} is not hermitian.'''
     print(rayleigh_quotient(A    ,				A      )      )

     lowercase__				 =							np.array([[1, 2, 4], [2, 3, -1], [4, -1, 1]]      )
     assert is_hermitian(A      ), f'''{a} is not hermitian.'''
     assert rayleigh_quotient(A    ,				A      ) == float(3      )


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 tests()




