Bounds

Contents

Bounds#

Parameter bounds handling.

everwillow.parameters.bounds.unwrap(state, transform_mapping)[source]#

Transform parameter values from bounded to unconstrained space.

Applies each transform’s unwrap method to the corresponding parameter in state. Parameters not in transform_mapping are left unchanged.

Parameters:
Returns:

New state with unconstrained (internal) parameter values.

Raises:

KeyError – If transform_mapping contains keys not in state.

Return type:

State[V]

everwillow.parameters.bounds.wrap(state, transform_mapping)[source]#

Transform parameter values from unconstrained back to bounded space.

Applies each transform’s wrap method to the corresponding parameter in state. Parameters not in transform_mapping are left unchanged.

Parameters:
Returns:

New state with bounded (external) parameter values.

Raises:

KeyError – If transform_mapping contains keys not in state.

Return type:

State[V]