Skip to content

GPMixin: Fix Exception when target min or max empty Timeseries

Tjerk Vreeken requested to merge fix-path-goal-target-all-nan into master

If target_min and target_max are both empty Timeseries (full of NaNs), the "is_empty" attribute is True and the Goal is skipped in its entirety. However, in case only one of the two targets is empty, we would get an Exception in CollInt due to setting an empty constraint of size MX(1x0).

This bug was introduced in commit a788207e when support for vector goals was added. To make sure that results for a vector goal are exactly equivalent to its non-vector counterpart, the slicing of a (vector) soft constraint was added in the relevant section of code. This slicing did not account for the possibility of no element of the constraint expression being active.

Merge request reports