





from typing import Any

import numpy as np



def 		A_    (					_lowerCAmelCase					)						->			bool:
 return np.array_equal(_lowerCAmelCase							,       matrix.conjugate().T					)



def 		A_    (					_lowerCAmelCase							,       _lowerCAmelCase					)						->			Any:
 UpperCamelCase     : str	     =       v.conjugate().T
 UpperCamelCase     : Optional[Any]	     =       v_star.dot(_lowerCAmelCase					)
 assert isinstance(_lowerCAmelCase							,       np.ndarray					)
 return (v_star_dot.dot(_lowerCAmelCase					)) / (v_star.dot(_lowerCAmelCase					))



def 		A_    (					)						->			None:
 UpperCamelCase     : Any	     =       np.array([[2, 2 + 1j, 4], [2 - 1j, 3, 1j], [4, -1j, 1]]					)
 UpperCamelCase     : Any	     =       np.array([[1], [2], [3]]					)
 assert is_hermitian(_lowerCAmelCase					), F"""{a} is not hermitian."""
 print(rayleigh_quotient(_lowerCAmelCase							,       _lowerCAmelCase					)					)

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







from ...configuration_utils import PretrainedConfig
from ...utils import logging


__lowerCamelCase	:					Tuple			  =					logging.get_logger(__name__)



class  A__       (	__snake_case      ):
      _UpperCAmelCase     :List[Any]						   =       'timm_backbone'





      def __init__(			self	,							A_=None	,							A_=3	,							A_=True	,							A_=True	,							A_=None	,							**A_	,							):
       '''simple docstring'''




       super().__init__(**A_       )
       UpperCamelCase     : Tuple	     =       backbone
       UpperCamelCase     : Dict	     =       num_channels
       UpperCamelCase     : Tuple	     =       features_only
       UpperCamelCase     : Optional[int]	     =       use_pretrained_backbone
       UpperCamelCase     : Dict	     =       True
       UpperCamelCase     : List[str]	     =       out_indices if out_indices is not None else (-1,)
