OptimizationProblem.interpolate: Guard against out-of-bounds array access
In particular cases, divmod can return close-to-zero residuals. We needed to add an additional check to correctly handle this happening at the final data point.
In particular cases, divmod can return close-to-zero residuals. We needed to add an additional check to correctly handle this happening at the final data point.