






"""simple docstring"""






from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase_     :				Optional[int]         =				logging.get_logger(__name__)

UpperCAmelCase_     :				Dict         =				{
    """sayakpaul/vit-msn-base""": """https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json""",
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}




class 							lowerCAmelCase__       (    UpperCAmelCase__				):






      '''simple docstring'''

      __UpperCamelCase							=						"vit_msn"
      def __init__(		self  :						Union[str, Any]		,			lowercase_  :						int=768		,			lowercase_  :						Union[str, Any]=12		,			lowercase_  :						Optional[int]=12		,			lowercase_  :						List[str]=3072		,			lowercase_  :						Dict="gelu"		,			lowercase_  :						Optional[Any]=0.0		,			lowercase_  :						Optional[int]=0.0		,			lowercase_  :						Optional[Any]=0.02		,			lowercase_  :						Dict=1e-06		,			lowercase_  :						str=224		,			lowercase_  :						Optional[Any]=16		,			lowercase_  :						Optional[Any]=3		,			lowercase_  :						List[Any]=True		,			**lowercase_  :						Any		,			):




          '''simple docstring'''


          super().__init__(**lowercase_)

          SCREAMING_SNAKE_CASE_   :						Optional[Any]							=	hidden_size
          SCREAMING_SNAKE_CASE_   :						Optional[int]							=	num_hidden_layers
          SCREAMING_SNAKE_CASE_   :						List[str]							=	num_attention_heads
          SCREAMING_SNAKE_CASE_   :						Union[str, Any]							=	intermediate_size
          SCREAMING_SNAKE_CASE_   :						Union[str, Any]							=	hidden_act
          SCREAMING_SNAKE_CASE_   :						int							=	hidden_dropout_prob
          SCREAMING_SNAKE_CASE_   :						Optional[int]							=	attention_probs_dropout_prob
          SCREAMING_SNAKE_CASE_   :						int							=	initializer_range
          SCREAMING_SNAKE_CASE_   :						List[Any]							=	layer_norm_eps
          SCREAMING_SNAKE_CASE_   :						Tuple							=	image_size
          SCREAMING_SNAKE_CASE_   :						Optional[Any]							=	patch_size
          SCREAMING_SNAKE_CASE_   :						Tuple							=	num_channels
          SCREAMING_SNAKE_CASE_   :						List[Any]							=	qkv_bias










"""simple docstring"""






from __future__ import annotations

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



def       _A    (__a					,       __a					,       __a = False							)				-> list[float]:
    """simple docstring"""






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



def       _A    (__a					,       __a					,       __a = 10**-1							)				-> bool:
    """simple docstring"""






    SCREAMING_SNAKE_CASE_   :						NDArray[floataa]							=	cross(__a					,       __a							)
    SCREAMING_SNAKE_CASE_   :						float							=	sum(__a							)
    return abs(__a							) < eps


if __name__ == "__main__":
  # Test to check if it works
  UpperCAmelCase_     :				Union[str, Any]         =				array(
      [
          polar_force(7_1_8.4, 180 - 30),
          polar_force(8_7_9.5_4, 45),
          polar_force(100, -90),
      ]
  )

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

  assert in_static_equilibrium(forces, location)

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

  UpperCAmelCase_     :				Optional[int]         =				array([[0, 0], [0, 0], [0, 0]])

  assert in_static_equilibrium(forces, location)

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

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

  assert in_static_equilibrium(forces, location)

  import doctest

  doctest.testmod()


