numojo.routines.math.trig¶
Trigonometric routines for NuMojo (numojo.routines.math.trig).
Implements trigonometric and inverse trigonometric functions over NDArrays and Matrices.
Functions¶
acos¶
Overload 1¶
Apply acos also known as inverse cosine .
Parameters:
dtype(DType): The element type.backend(Backend): Sets utility function origin, defaults to `Vectorized.
Args:
array(NDArray): An Array.
Returns:
NDArray
Raises
Overload 2¶
Parameters:
dtype(DType)
Args:
A(Matrix)
Returns:
Matrix
asin¶
Overload 1¶
Apply asin also known as inverse sine .
Parameters:
dtype(DType): The element type.backend(Backend): Sets utility function origin, defaults to `Vectorized.
Args:
array(NDArray): An Array.
Returns:
NDArray
Raises
Overload 2¶
Parameters:
dtype(DType)
Args:
A(Matrix)
Returns:
Matrix
atan¶
Overload 1¶
Apply atan also known as inverse tangent .
Parameters:
dtype(DType): The element type.backend(Backend): Sets utility function origin, defaults to `Vectorized.
Args:
array(NDArray): An Array.
Returns:
NDArray
Raises
Overload 2¶
Parameters:
dtype(DType)
Args:
A(Matrix)
Returns:
Matrix
atan2¶
atan2[dtype: DType, backend: Backend = Vectorized](array1: NDArray[dtype], array2: NDArray[dtype]) -> NDArray[dtype]
Apply atan2 also known as inverse tangent. atan2 wikipedia.
Constraints
Both arrays must have the same shapes.
Parameters:
dtype(DType): The element type.backend(Backend): Sets utility function origin, defaults to `Vectorized.
Args:
array1(NDArray): An Array.array2(NDArray): An Array.
Returns:
NDArray
Raises
cos¶
Overload 1¶
Apply cos also known as cosine.
Parameters:
dtype(DType): The element type.backend(Backend): Sets utility function origin, defaults to `Vectorized.
Args:
array(NDArray): An Array assumed to be in radian.
Returns:
NDArray
Raises
Overload 2¶
Parameters:
dtype(DType)
Args:
A(Matrix)
Returns:
Matrix
sin¶
Overload 1¶
Apply sin also known as sine .
Parameters:
dtype(DType): The element type.backend(Backend): Sets utility function origin, defaults to `Vectorized.
Args:
array(NDArray): An Array assumed to be in radian.
Returns:
NDArray
Raises
Overload 2¶
Parameters:
dtype(DType)
Args:
A(Matrix)
Returns:
Matrix
tan¶
Overload 1¶
Apply tan also known as tangent .
Parameters:
dtype(DType): The element type.backend(Backend): Sets utility function origin, defaults to `Vectorized.
Args:
array(NDArray): An Array assumed to be in radian.
Returns:
NDArray
Raises
Overload 2¶
Parameters:
dtype(DType)
Args:
A(Matrix)
Returns:
Matrix
hypot¶
hypot[dtype: DType, backend: Backend = Vectorized](array1: NDArray[dtype], array2: NDArray[dtype]) -> NDArray[dtype]
Apply hypot also known as hypotenuse which finds the longest section of a right triangle given the other two sides.
Constraints
Both arrays must have the same shapes.
Parameters:
dtype(DType): The element type.backend(Backend): Sets utility function origin, defaults to `Vectorized.
Args:
array1(NDArray): An Array.array2(NDArray): An Array.
Returns:
NDArray
Raises
hypot_fma¶
hypot_fma[dtype: DType, backend: Backend = Vectorized](array1: NDArray[dtype], array2: NDArray[dtype]) -> NDArray[dtype]
Apply hypot also known as hypotenuse which finds the longest section of a right triangle given the other two sides.
Constraints
Both arrays must have the same shapes.
Parameters:
dtype(DType): The element type.backend(Backend): Sets utility function origin, defaults to `Vectorized.
Args:
array1(NDArray): An Array.array2(NDArray): An Array.
Returns:
NDArray
Raises