desc.objectives.ObjectiveFunction.unpack_state

ObjectiveFunction.unpack_state(x, per_objective=True)Source

Unpack the state vector into its components.

Parameters:
  • x (ndarray) – State vector.

  • per_objective (bool) – Whether to return param dicts for each objective (default) or for each unique optimizable thing.

Returns:

params (pytree of dict) – if per_objective is True, this is a nested list of parameters for each sub-Objective, such that self.objectives[i] has parameters params[i]. Otherwise, it is a list of parameters tied to each optimizable thing such that params[i] = self.things[i].params_dict