tracts.driver_utils.collapse_identical_start_params#
- collapse_identical_start_params(start_params, step_label)#
Collapse repeated identical starting-parameter sets to a single repetition.
This is used when all generated starting parameters for a step are the same, for example because the inputs were specified as single fixed values or because ancestry-fixed parameters made every draw collapse to the same point.
- Parameters:
start_params (
list[ndarray]) – Candidate starting-parameter sets for one optimization step.step_label (
str) – Human-readable label used in the warning message (for example,"step 1"or"step 2").
- Returns:
The original list if it contains zero or one entry, or a single-entry list containing the unique start if every entry is identical.
- Return type:
list[ndarray]