






from typing import Optional

from .. import Features, NamedSplit
from ..packaged_modules.text.text import Text
from ..utils.typing import NestedDataStructureLike, PathLike
from .abc import AbstractDatasetReader






class 						lowercase_   (      lowercase  ):






      '''simple docstring'''




      def __init__( self :		int					,   __UpperCAmelCase :		NestedDataStructureLike[PathLike]					,   __UpperCAmelCase :		Optional[NamedSplit] = None					,   __UpperCAmelCase :		Optional[Features] = None					,   __UpperCAmelCase :		str = None					,   __UpperCAmelCase :		bool = False					,   __UpperCAmelCase :		bool = False					,   __UpperCAmelCase :		Optional[int] = None					,   **__UpperCAmelCase :		List[str]					,   )       ->Dict:




       """simple docstring"""


       super().__init__(
           __UpperCAmelCase					,   split=__UpperCAmelCase					,   features=__UpperCAmelCase					,   cache_dir=__UpperCAmelCase					,   keep_in_memory=__UpperCAmelCase					,   streaming=__UpperCAmelCase					,   num_proc=__UpperCAmelCase					,   **__UpperCAmelCase					,   )
       a						    = path_or_paths if isinstance(__UpperCAmelCase					,   __UpperCAmelCase    ) else {self.split: path_or_paths}
       a						    = Text(
           cache_dir=__UpperCAmelCase					,   data_files=__UpperCAmelCase					,   features=__UpperCAmelCase					,   **__UpperCAmelCase					,   )







      def  __lowerCAmelCase   ( self :		List[str]    )       ->Dict:




       """simple docstring"""


       if self.streaming:
        a						    = self.builder.as_streaming_dataset(split=self.split    )
       # Build regular (map-style) dataset
       else:
        a						    = None
        a						    = None
        a						    = None
        a						    = None

        self.builder.download_and_prepare(
            download_config=__UpperCAmelCase					,   download_mode=__UpperCAmelCase					,   verification_mode=__UpperCAmelCase					,   base_path=__UpperCAmelCase					,   num_proc=self.num_proc					,   )
        a						    = self.builder.as_dataset(
            split=self.split					,   verification_mode=__UpperCAmelCase					,   in_memory=self.keep_in_memory    )
       return dataset










from typing import Any

import numpy as np
def 		_a       ( a					:np.ndarray					)				->     bool:
 return np.array_equal(a      ,				matrix.conjugate().T					)
def 		_a       ( a					:np.ndarray      ,				a					:np.ndarray					)				->     Any:
 a						    = v.conjugate().T
 a						    = v_star.dot(a					)
 assert isinstance(a      ,				np.ndarray					)
 return (v_star_dot.dot(a					)) / (v_star.dot(a					))
def 		_a       ( )				->     None:
 a						    = np.array([[2, 2 + 1j, 4], [2 - 1j, 3, 1j], [4, -1j, 1]]					)
 a						    = np.array([[1], [2], [3]]					)
 assert is_hermitian(a					), F"""{a} is not hermitian."""
 print(rayleigh_quotient(a      ,				a					)					)

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


