






from ..utils import DummyObject, requires_backends







class        a__       (   metaclass=UpperCAmelCase       ):







  """simple docstring"""




  UpperCAmelCase__      : str			       =["""speech"""]


  def __init__(			self    : Dict				,				*UpperCAmelCase__    : str				,				**UpperCAmelCase__    : int		)					->Tuple:
        """simple docstring"""







        requires_backends(self				,				["""speech"""]		)







class        a__       (   metaclass=UpperCAmelCase       ):







  """simple docstring"""




  UpperCAmelCase__      : Optional[Any]			       =["""speech"""]


  def __init__(			self    : Optional[Any]				,				*UpperCAmelCase__    : Union[str, Any]				,				**UpperCAmelCase__    : List[str]		)					->Optional[Any]:
        """simple docstring"""







        requires_backends(self				,				["""speech"""]		)







from typing import Any

import numpy as np






def 					__lowercase      (     _A			)     ->						bool:
      return np.array_equal(_A						,    matrix.conjugate().T			)






def 					__lowercase      (     _A						,    _A			)     ->						Any:
      SCREAMING_SNAKE_CASE :      Optional[int]       =   v.conjugate().T
      SCREAMING_SNAKE_CASE :      List[Any]       =   v_star.dot(_A			)
      assert isinstance(_A						,    np.ndarray			)
      return (v_star_dot.dot(_A			)) / (v_star.dot(_A			))






def 					__lowercase      (     )     ->						None:
      SCREAMING_SNAKE_CASE :      Any       =   np.array([[2, 2 + 1J, 4], [2 - 1J, 3, 1J], [4, -1J, 1]]			)
      SCREAMING_SNAKE_CASE :      Optional[int]       =   np.array([[1], [2], [3]]			)
      assert is_hermitian(_A			), F"{a} is not hermitian."
      print(rayleigh_quotient(_A						,    _A			)			)

      SCREAMING_SNAKE_CASE :      Any       =   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()




