
"""simple docstring"""




A__   :					Optional[Any]							=   tuple[float, float, float]
A__   :					Optional[Any]							=   tuple[float, float, float]




def  _lowerCAmelCase		(		_UpperCamelCase ,				_UpperCamelCase						):






  """simple docstring"""



  _lowercase:			Any       =     end_pointa[0] - end_pointa[0]
  _lowercase:			Union[str, Any]       =     end_pointa[1] - end_pointa[1]
  _lowercase:			List[str]       =     end_pointa[2] - end_pointa[2]
  return (x, y, z)




def  _lowerCAmelCase		(		_UpperCamelCase ,				_UpperCamelCase						):






  """simple docstring"""



  _lowercase:			List[str]       =     ab[1] * ac[2] - ab[2] * ac[1]  # *i
  _lowercase:			Dict       =     (ab[0] * ac[2] - ab[2] * ac[0]) * -1  # *j
  _lowercase:			Dict       =     ab[0] * ac[1] - ab[1] * ac[0]  # *k
  return (x, y, z)




def  _lowerCAmelCase		(		_UpperCamelCase ,				_UpperCamelCase						):






  """simple docstring"""



  return tuple(round(_UpperCamelCase ,				_UpperCamelCase						) for x in vector						) == (0, 0, 0)







def  _lowerCAmelCase		(		_UpperCamelCase ,				_UpperCamelCase ,				_UpperCamelCase ,				_UpperCamelCase = 10						):






  """simple docstring"""



  _lowercase:			Any       =     create_vector(_UpperCamelCase ,				_UpperCamelCase						)
  _lowercase:			Optional[Any]       =     create_vector(_UpperCamelCase ,				_UpperCamelCase						)
  return is_zero_vector(get_ad_vectors_cross(_UpperCamelCase ,				_UpperCamelCase						) ,				_UpperCamelCase						)


"""simple docstring"""




from __future__ import annotations

import numpy as np




def  _lowerCAmelCase		(		_UpperCamelCase						):






  """simple docstring"""



  _lowercase ,				_lowercase:			List[str]       =     np.shape(_UpperCamelCase						)
  if rows != columns:
    _lowercase:			int       =     (
        '''\'table\' has to be of square shaped array but got a '''
        f'''{rows}x{columns} array:\n{table}'''
    )
    raise ValueError(_UpperCamelCase						)

  _lowercase:			Tuple       =     np.zeros((rows, columns)						)
  _lowercase:			Tuple       =     np.zeros((rows, columns)						)
  for i in range(_UpperCamelCase						):
    for j in range(_UpperCamelCase						):
      _lowercase:			List[Any]       =     sum(lower[i][k] * upper[k][j] for k in range(_UpperCamelCase						)						)
      if upper[j][j] == 0:
        raise ArithmeticError('''No LU decomposition exists'''						)
      _lowercase:			Any       =     (table[i][j] - total) / upper[j][j]
    _lowercase:			Any       =     1
    for j in range(_UpperCamelCase ,				_UpperCamelCase						):
      _lowercase:			Optional[int]       =     sum(lower[i][k] * upper[k][j] for k in range(_UpperCamelCase						)						)
      _lowercase:			List[str]       =     table[i][j] - total
  return lower, upper


if __name__ == "__main__":
  import doctest

  doctest.testmod()
