from typing import Any

import numpy as np







def     _a				(      lowercase__  :			np.ndarray ):







     '''simple docstring'''


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







def     _a				(      lowercase__  :			np.ndarray     ,  lowercase__  :			np.ndarray ):







     '''simple docstring'''


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







def     _a				(      ):







     '''simple docstring'''


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

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


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      tests()




import math







def     _a				(      lowercase__  :			int ):







     '''simple docstring'''


     assert isinstance(lowercase__     ,  lowercase__ ) and (
         number >= 0
     ), "'number' must been an int and positive"

     if 1 < number < 4:
          # 2 and 3 are primes
          return True
     elif number < 2 or not number % 2:
          # Negatives, 0, 1 and all even numbers are not primes
          return False

     SCREAMING_SNAKE_CASE__				:				Tuple			=		range(3     ,  int(math.sqrt(lowercase__ ) + 1 )     ,  2 )
     return not any(not number % i for i in odd_numbers )







def     _a				(      lowercase__  :			List[str]     ,  lowercase__  :			Any=1     ,  **lowercase__  :			Any ):







     '''simple docstring'''


     SCREAMING_SNAKE_CASE__				:				int			=		factor * value
     SCREAMING_SNAKE_CASE__				:				Dict			=		value

     while not is_prime(lowercase__ ):
          value += 1 if not ("desc" in kwargs and kwargs["desc"] is True) else -1

     if value == first_value_val:
          return next_prime(value + 1     ,  **lowercase__ )
     return value



