diff --git a/pybop/plot/problem.py b/pybop/plot/problem.py index 3a644fb5c..3cc4ba020 100644 --- a/pybop/plot/problem.py +++ b/pybop/plot/problem.py @@ -73,7 +73,9 @@ def quick(problem, problem_inputs: Inputs = None, show=True, **layout_kwargs): ) plot_dict.traces.append(target_trace) - if isinstance(problem, FittingProblem): + if isinstance(problem, FittingProblem) and len(model_output[i]) == len( + target_output[i] + ): # Compute the standard deviation as proxy for uncertainty plot_dict.sigma = np.std(model_output[i] - target_output[i])