"""simple docstring"""


from typing import Any

import numpy as np






def      __UpperCAmelCase       (      lowercase		):







  """simple docstring"""
  return np.array_equal(lowercase ,matrix.conjugate().T		)






def      __UpperCAmelCase       (      lowercase ,lowercase		):







  """simple docstring"""
  _UpperCAmelCase    			=   v.conjugate().T
  _UpperCAmelCase    			=   v_star.dot(lowercase		)
  assert isinstance(lowercase ,np.ndarray		)
  return (v_star_dot.dot(lowercase		)) / (v_star.dot(lowercase		))






def      __UpperCAmelCase       (      ):







  """simple docstring"""
  _UpperCAmelCase    			=   np.array([[2, 2 + 1J, 4], [2 - 1J, 3, 1J], [4, -1J, 1]]		)
  _UpperCAmelCase    			=   np.array([[1], [2], [3]]		)
  assert is_hermitian(lowercase		), f'''{a} is not hermitian.'''
  print(rayleigh_quotient(lowercase ,lowercase		)		)

  _UpperCAmelCase    			=   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()

"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


UpperCAmelCase__			=    {"""configuration_vit_mae""": ["""VIT_MAE_PRETRAINED_CONFIG_ARCHIVE_MAP""", """ViTMAEConfig"""]}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase__			=    [
        """VIT_MAE_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """ViTMAEForPreTraining""",
        """ViTMAELayer""",
        """ViTMAEModel""",
        """ViTMAEPreTrainedModel""",
    ]

try:
    if not is_tf_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase__			=    [
        """TFViTMAEForPreTraining""",
        """TFViTMAEModel""",
        """TFViTMAEPreTrainedModel""",
    ]

if TYPE_CHECKING:
    from .configuration_vit_mae import VIT_MAE_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTMAEConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_vit_mae import (
            VIT_MAE_PRETRAINED_MODEL_ARCHIVE_LIST,
            ViTMAEForPreTraining,
            ViTMAELayer,
            ViTMAEModel,
            ViTMAEPreTrainedModel,
        )

    try:
        if not is_tf_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_tf_vit_mae import TFViTMAEForPreTraining, TFViTMAEModel, TFViTMAEPreTrainedModel


else:
    import sys

    UpperCAmelCase__			=    _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
