


'''simple docstring'''






from math import sqrt

import numpy as np
from sympy import symbols

# Coefficient
# Speed of light (m/s)
__A					:  Dict											=      2_9979_2458

# Symbols
__A							, __A							, __A							, __A					:  str											=      symbols("ct x y z")







def 				UpperCamelCase_			(    A__					:   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 				UpperCamelCase_			(    A__					:   float					):
  '''simple docstring'''





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







def 				UpperCamelCase_			(    A__					:   float					):
  '''simple docstring'''





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







def 				UpperCamelCase_			(    A__					:   float							,    A__					:   np.ndarray | None = None					):
  '''simple docstring'''





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

  return transformation_matrix(A__					) @ event


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  # Example of symbolic vector:
  __A					:  Dict											=      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
  __A					:  Dict											=      {ct: c, x: 1, y: 1, z: 1}
  __A					:  Dict											=      [four_vector[i].subs(sub_dict) for i in range(4)]

  print(F'''\n{numerical_vector}''')







'''simple docstring'''






from statistics import mean, stdev







def 				UpperCamelCase_			(    A__					:   list							,    A__					:   int = 3					):
  '''simple docstring'''





  lowerCAmelCase_			:      List[str]			=   min(A__					)
  lowerCAmelCase_			:      Optional[int]			=   max(A__					)
  # normalize data
  return [round((x - x_min) / (x_max - x_min)							,    A__					) for x in data]







def 				UpperCamelCase_			(    A__					:   list							,    A__					:   int = 3					):
  '''simple docstring'''





  lowerCAmelCase_			:      str			=   mean(A__					)
  lowerCAmelCase_			:      List[Any]			=   stdev(A__					)
  # standardize data
  return [round((x - mu) / (sigma)							,    A__					) for x in data]



