gemseo.utils.derivatives.factory module#

A factory of gradient approximators.

class GradientApproximatorFactory[source]#

Bases: BaseFactory

A factory of gradient approximators.

Return type:

Any

create(name, *args, **kwargs)[source]#

Create a gradient approximator.

Parameters:
  • name (ApproximationMode) -- The name of the class or the approximation mode.

  • *args (Any) -- The description is missing.

  • **kwargs (Any) -- The keyword arguments to be passed to the class constructor.

Returns:

The gradient approximator.

Raises:

TypeError -- If the class cannot be instantiated.

Return type:

BaseGradientApproximator