




'''simple docstring'''


from __future__ import annotations

lowerCAmelCase_      :  Optional[Any]				     =  10



def  _SCREAMING_SNAKE_CASE     (      UpperCamelCase__    :					list[int]				):




     """simple docstring"""


     a_     :							int     						=  1
     a_     :							Optional[int]     						=  max(UpperCamelCase__				)
     while placement <= max_digit:
          # declare and initialize empty buckets
          a_     :							list[list]     						=  [[] for _ in range(UpperCamelCase__				)]
          # split list_of_ints between the buckets
          for i in list_of_ints:
               a_     :							Optional[Any]     						=  int((i / placement) % RADIX				)
               buckets[tmp].append(UpperCamelCase__				)
          # put each buckets' contents into list_of_ints
          a_     :							Union[str, Any]     						=  0
          for b in range(UpperCamelCase__				):
               for i in buckets[b]:
                    a_     :							str     						=  i
                    a += 1
        # move to next
          placement *= RADIX
     return list_of_ints


if __name__ == "__main__":
 import doctest

 doctest.testmod()






'''simple docstring'''


from math import sqrt

import numpy as np
from sympy import symbols

# Coefficient
# Speed of light (m/s)
lowerCAmelCase_      :  List[Any]				     =  2_9979_2458

# Symbols
lowerCAmelCase_     ,   lowerCAmelCase_     ,   lowerCAmelCase_     ,   lowerCAmelCase_      :  Tuple				     =  symbols('ct x y z')



def  _SCREAMING_SNAKE_CASE     (      UpperCamelCase__    :					float				):




     """simple docstring"""


     if velocity > c:
          raise ValueError("""Speed must not exceed light speed 299,792,458 [m/s]!"""				)
     elif velocity < 1:
          # Usually the speed should be much higher than 1 (c order of magnitude)
          raise ValueError("""Speed must be greater than or equal to 1!"""				)

     return velocity / c



def  _SCREAMING_SNAKE_CASE     (      UpperCamelCase__    :					float				):




     """simple docstring"""


     return 1 / sqrt(1 - beta(UpperCamelCase__				) ** 2				)



def  _SCREAMING_SNAKE_CASE     (      UpperCamelCase__    :					float				):




     """simple docstring"""


     return np.array(
         [
             [gamma(UpperCamelCase__				), -gamma(UpperCamelCase__				) * beta(UpperCamelCase__				), 0, 0],
             [-gamma(UpperCamelCase__				) * beta(UpperCamelCase__				), gamma(UpperCamelCase__				), 0, 0],
             [0, 0, 1, 0],
             [0, 0, 0, 1],
         ]				)



def  _SCREAMING_SNAKE_CASE     (      UpperCamelCase__    :					float ,    UpperCamelCase__    :					np.ndarray | None = None				):




     """simple docstring"""


     if event is None:
          a_     :							str     						=  np.array([ct, x, y, z]				)  # Symbolic four vector
     else:
          event[0] *= c  # x0 is ct (speed of light * time)

     return transformation_matrix(UpperCamelCase__				) @ event


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 # Example of symbolic vector:
 lowerCAmelCase_      :  Union[str, Any]				     =  transform(2997_9245)
 print('Example of four vector: ')
 print(f"ct' = {four_vector[0]}")
 print(f"x' = {four_vector[1]}")
 print(f"y' = {four_vector[2]}")
 print(f"z' = {four_vector[3]}")

 # Substitute symbols with numerical values
 lowerCAmelCase_      :  Tuple				     =  {ct: c, x: 1, y: 1, z: 1}
 lowerCAmelCase_      :  Optional[int]				     =  [four_vector[i].subs(sub_dict) for i in range(4)]

 print(f"\n{numerical_vector}")
