



'''simple docstring'''
snake_case_			:     Tuple  	=  tuple[float, float, float]
snake_case_			:     Optional[int]  	=  tuple[float, float, float]






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_							):
						_UpperCamelCase :		Tuple			    =       end_pointa[0] - end_pointa[0]
						_UpperCamelCase :		List[str]			    =       end_pointa[1] - end_pointa[1]
						_UpperCamelCase :		int			    =       end_pointa[2] - end_pointa[2]
						return (x, y, z)






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_							):
						_UpperCamelCase :		Dict			    =       ab[1] * ac[2] - ab[2] * ac[1]  # *i
						_UpperCamelCase :		int			    =       (ab[0] * ac[2] - ab[2] * ac[0]) * -1  # *j
						_UpperCamelCase :		Dict			    =       ab[0] * ac[1] - ab[1] * ac[0]  # *k
						return (x, y, z)






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_							):
						return tuple(round(UpperCAmelCase_  ,  UpperCAmelCase_							) for x in vector							) == (0, 0, 0)






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_ = 1_0							):
						_UpperCamelCase :		Tuple			    =       create_vector(UpperCAmelCase_  ,  UpperCAmelCase_							)
						_UpperCamelCase :		List[str]			    =       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 A__   (					UpperCAmelCase_							):
						_UpperCamelCase    ,      _UpperCamelCase :		Optional[int]			    =       np.shape(UpperCAmelCase_							)
						if rows != columns:
												_UpperCamelCase :		Union[str, Any]			    =       (
												    '\'table\' has to be of square shaped array but got a '
												    f'{rows}x{columns} array:\n{table}'
												)
												raise ValueError(UpperCAmelCase_							)

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


if __name__ == "__main__":
					import doctest

					doctest.testmod()


