gemseo.disciplines.taylor module#
A discipline to create Taylor polynomials from another discipline.
- class TaylorDiscipline(discipline, input_data=mappingproxy({}), name='')[source]#
Bases:
Discipline
The first-order polynomial of a discipline.
The first-order polynomial of a function \(f\) at an expansion point \(a\) is \(f(a)+\sum_{i=1}^d\frac{\partial f(a)}{\partial x_i}(x_i-a_i)\).
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
discipline (Discipline) -- The discipline to be approximated by a Taylor polynomial.
input_data (Mapping[str, NDArray[float]]) --
The point of expansion. If empty, use the default inputs of
discipline
.By default it is set to {}.
name (str) --
The name of the discipline. If empty, use the name of the class.
By default it is set to "".
- Raises:
ValueError -- If neither
input_data
nordiscipline.io.input_grammar.defaults` is specified --