
from math import atan, cos, radians, sin, tan

from .haversine_distance import haversine_distance

SCREAMING_SNAKE_CASE							:List[Any]										=    6378137.0
SCREAMING_SNAKE_CASE							:List[str]										=    6356752.314245
SCREAMING_SNAKE_CASE							:Optional[int]										=    637_8137


def 						UpperCAmelCase      (     a_		,       a_		,       a_		,       a_						)		->     float:







    """simple docstring"""



    __A             =			(AXIS_A - AXIS_B) / AXIS_A
    # Parametric latitudes
    # https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
    __A             =			atan((1 - flattening) * tan(radians(a_						)						)						)
    __A             =			atan((1 - flattening) * tan(radians(a_						)						)						)

    # Compute central angle between two points
    # using haversine theta. sigma =  haversine_distance / equatorial radius
    __A             =			haversine_distance(a_		,       a_		,       a_		,       a_						) / EQUATORIAL_RADIUS

    # Intermediate P and Q values
    __A             =			(b_lata + b_lata) / 2
    __A             =			(b_lata - b_lata) / 2

    # Intermediate X value
    # X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
    __A             =			(sin(a_						) ** 2) * (cos(a_						) ** 2)
    __A             =			cos(sigma / 2						) ** 2
    __A             =			(sigma - sin(a_						)) * (x_numerator / x_demonimator)

    # Intermediate Y value
    # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
    __A             =			(cos(a_						) ** 2) * (sin(a_						) ** 2)
    __A             =			sin(sigma / 2						) ** 2
    __A             =			(sigma + sin(a_						)) * (y_numerator / y_denominator)

    return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


if __name__ == "__main__":
     import doctest

     doctest.testmod()


import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import ClassLabel, Features, Value
from .base import TaskTemplate





@dataclass(frozen=__SCREAMING_SNAKE_CASE  )
class 							UpperCAmelCase				(  __SCREAMING_SNAKE_CASE  ):




	'''simple docstring'''





	snake_case_    =					field(default="text-classification"      ,      metadata={"include_in_asdict_even_if_is_default": True}  )
	snake_case_    =					Features({"text": Value("string"  )}  )
	snake_case_    =					Features({"labels": ClassLabel}  )
	snake_case_    =					"text"
	snake_case_    =					"labels"






	def     UpperCamelCase_  (	self :			Optional[Any]							,A :			Dict			):
					if self.label_column not in features:
									raise ValueError(f'''Column {self.label_column} is not present in features.'''			)
					if not isinstance(features[self.label_column]							,A			):
									raise ValueError(f'''Column {self.label_column} is not a ClassLabel.'''			)
					__A             =			copy.deepcopy(self			)
					__A             =			self.label_schema.copy()
					__A             =			features[self.label_column]
					__A             =			label_schema
					return task_template







	@property
	def     UpperCamelCase_  (	self :			Dict			):
					return {
					    self.text_column: "text",
					    self.label_column: "labels",
					}
