




from __future__ import annotations

from numpy import array, cos, cross, floataa, radians, sin
from numpy.typing import NDArray







def SCREAMING_SNAKE_CASE				(       lowercase_ ,				lowercase_ ,				lowercase_ = False						)   ->       list[float]:



       """simple docstring"""

       if radian_mode:
              return [magnitude * cos(lowercase_						), magnitude * sin(lowercase_						)]
       return [magnitude * cos(radians(lowercase_						)						), magnitude * sin(radians(lowercase_						)						)]







def SCREAMING_SNAKE_CASE				(       lowercase_ ,				lowercase_ ,				lowercase_ = 10**-1						)   ->       bool:



       """simple docstring"""

       A__       =    cross(lowercase_ ,				lowercase_						)
       A__       =    sum(lowercase_						)
       return abs(lowercase_						) < eps


if __name__ == "__main__":
  # Test to check if it works
  _lowerCamelCase	:		Optional[Any]							       =   array(
      [
          polar_force(718.4, 180 - 30),
          polar_force(879.54, 45),
          polar_force(100, -90),
      ]
  )

  _lowerCamelCase	:		NDArray[floataa]							       =   array([[0, 0], [0, 0], [0, 0]])

  assert in_static_equilibrium(forces, location)

  # Problem 1 in image_data/2D_problems.jpg
  _lowerCamelCase	:		Union[str, Any]							       =   array(
      [
          polar_force(30 * 9.81, 15),
          polar_force(215, 180 - 45),
          polar_force(264, 90 - 30),
      ]
  )

  _lowerCamelCase	:		Dict							       =   array([[0, 0], [0, 0], [0, 0]])

  assert in_static_equilibrium(forces, location)

  # Problem in image_data/2D_problems_1.jpg
  _lowerCamelCase	:		Dict							       =   array([[0, -2000], [0, -1200], [0, 15600], [0, -12400]])

  _lowerCamelCase	:		Optional[Any]							       =   array([[0, 0], [6, 0], [10, 0], [12, 0]])

  assert in_static_equilibrium(forces, location)

  import doctest

  doctest.testmod()



'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


__a: Dict          =   {
    """configuration_ctrl""": ["""CTRL_PRETRAINED_CONFIG_ARCHIVE_MAP""", """CTRLConfig"""],
    """tokenization_ctrl""": ["""CTRLTokenizer"""],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __a: int          =   [
      """CTRL_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """CTRLForSequenceClassification""",
      """CTRLLMHeadModel""",
      """CTRLModel""",
      """CTRLPreTrainedModel""",
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __a: int          =   [
      """TF_CTRL_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """TFCTRLForSequenceClassification""",
      """TFCTRLLMHeadModel""",
      """TFCTRLModel""",
      """TFCTRLPreTrainedModel""",
  ]


if TYPE_CHECKING:
  from .configuration_ctrl import CTRL_PRETRAINED_CONFIG_ARCHIVE_MAP, CTRLConfig
  from .tokenization_ctrl import CTRLTokenizer

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_ctrl import (
        CTRL_PRETRAINED_MODEL_ARCHIVE_LIST,
        CTRLForSequenceClassification,
        CTRLLMHeadModel,
        CTRLModel,
        CTRLPreTrainedModel,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_ctrl import (
        TF_CTRL_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFCTRLForSequenceClassification,
        TFCTRLLMHeadModel,
        TFCTRLModel,
        TFCTRLPreTrainedModel,
    )

else:
  import sys

  __a: Dict          =   _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

