gemseo.core.mdo_functions.function_restriction module#
A function mapping another one from some input components.
- class FunctionRestriction(frozen_indexes, frozen_values, input_dim, mdo_function, name='', f_type=FunctionType.NONE, expr='', input_names=())[source]#
Bases:
MDOFunction
Take an
MDOFunction
and apply a given restriction to its inputs.- Parameters:
frozen_indexes (ndarray[int]) -- The indexes of the inputs that will be frozen
frozen_values (NumberArray) -- The values of the inputs that will be frozen.
input_dim (int) -- The dimension of input space of the function before restriction.
name (str) --
The name of the function after restriction. If empty, create a default name based on the name of the current function and on the argument input_names.
By default it is set to "".
mdo_function (MDOFunction) -- The function to restrict.
f_type (MDOFunction.FunctionType) --
By default it is set to "".
expr (str) --
By default it is set to "".
input_names (Iterable[str]) --
By default it is set to ().
- Raises:
ValueError -- If the frozen_indexes and the frozen_values arrays do not have the same shape.