


'''simple docstring'''






from typing import Any

import numpy as np





def lowerCamelCase__     (		__lowerCamelCase			:				np.ndarray				):







   '''simple docstring'''




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





def lowerCamelCase__     (		__lowerCamelCase			:				np.ndarray			,       __lowerCamelCase			:				np.ndarray				):







   '''simple docstring'''




   _UpperCAmelCase  :  str				       =v.conjugate().T
   _UpperCAmelCase  :  Optional[int]				       =v_star.dot(__lowerCamelCase				)
   assert isinstance(__lowerCamelCase			,       np.ndarray				)
   return (v_star_dot.dot(__lowerCamelCase				)) / (v_star.dot(__lowerCamelCase				))





def lowerCamelCase__     (		):







   '''simple docstring'''




   _UpperCAmelCase  :  Optional[Any]				       =np.array([[2, 2 + 1J, 4], [2 - 1J, 3, 1J], [4, -1J, 1]]				)
   _UpperCAmelCase  :  List[str]				       =np.array([[1], [2], [3]]				)
   assert is_hermitian(__lowerCamelCase				), f"{a} is not hermitian."
   print(rayleigh_quotient(__lowerCamelCase			,       __lowerCamelCase				)				)

   _UpperCAmelCase  :  List[str]				       =np.array([[1, 2, 4], [2, 3, -1], [4, -1, 1]]				)
   assert is_hermitian(__lowerCamelCase				), f"{a} is not hermitian."
   assert rayleigh_quotient(__lowerCamelCase			,       __lowerCamelCase				) == float(3				)


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 tests()





'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase				={
    'configuration_table_transformer': [
        'TABLE_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'TableTransformerConfig',
        'TableTransformerOnnxConfig',
    ]
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowercase				=[
     'TABLE_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TableTransformerForObjectDetection',
     'TableTransformerModel',
     'TableTransformerPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_table_transformer import (
     TABLE_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
     TableTransformerConfig,
     TableTransformerOnnxConfig,
 )

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_table_transformer import (
      TABLE_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
      TableTransformerForObjectDetection,
      TableTransformerModel,
      TableTransformerPreTrainedModel,
  )

else:
 import sys

 lowercase				=_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)

