Mathematical Functions¶
Module Mathematical Functions
Collection of the suppported, overloaded mathematical functions (e.g. sin, cos, exp, ..).
The ADTypes implement these functions as member functions. So in case the input a is an ADType, calling the respective member returns a new ADType with the calculated value (and its derivative representation). If the input a does not implement the mathematical function, a AttributeError is raised and we fall back to the numpy implementation.
See also
pyADiff.tangent.ADTypeT- Implementation of the tangent ADType.
pyADiff.adjoint.ADTypeA- Implementation of the adjoint ADType.
-
pyADiff.math_functions.sin(a)¶ Sine.
Implements the overload of the sine function.
Parameters: a (scalar, array of float or ADType) – Input of the function.
-
pyADiff.math_functions.cos(a)¶ Cosine.
Implements the overload of the cosine function.
Parameters: a (scalar, array of float or ADType) – Input of the function.
-
pyADiff.math_functions.exp(a)¶ Exponential.
Implements the overload of the exponential function.
Parameters: a (scalar, array of float or ADType) – Input of the function.
-
pyADiff.math_functions.log(a)¶ Logarithm.
Implements the overload of the logarithm function.
Parameters: a (scalar, array of float or ADType) – Input of the function.
-
pyADiff.math_functions.sqrt(a)¶ Square root.
Implements the overload of the square root function.
Parameters: a (scalar, array of float or ADType) – Input of the function.