





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowercase	: Tuple       ={
    """configuration_time_series_transformer""": [
        """TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """TimeSeriesTransformerConfig""",
    ],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     __lowercase	: Dict       =[
         """TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
         """TimeSeriesTransformerForPrediction""",
         """TimeSeriesTransformerModel""",
         """TimeSeriesTransformerPreTrainedModel""",
     ]


if TYPE_CHECKING:
     from .configuration_time_series_transformer import (
         TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
         TimeSeriesTransformerConfig,
     )

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_time_series_transformer import (
              TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
              TimeSeriesTransformerForPrediction,
              TimeSeriesTransformerModel,
              TimeSeriesTransformerPreTrainedModel,
          )

else:
     import sys

     __lowercase	: List[Any]       =_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)







from collections.abc import Sequence
def 							__SCREAMING_SNAKE_CASE     (   a__    :   Sequence[float]			,a__    :   float       )					->				float:
	return sum(c * (x**i) for i, c in enumerate(a__       )       )
def 							__SCREAMING_SNAKE_CASE     (   a__    :   Sequence[float]			,a__    :   float       )					->				float:
	__A :			Any		    =			0.0
	for coeff in reversed(a__       ):
		__A :			List[str]		    =			result * x + coeff
	return result


if __name__ == "__main__":
			UpperCAmelCase_							:					List[str]		 =   (0.0, 0.0, 5.0, 9.3, 7.0)
			UpperCAmelCase_							:					str		 =   10.0
			print(evaluate_poly(poly, x))
			print(horner(poly, x))





