diff --git a/CADETProcess/comparison/difference.py b/CADETProcess/comparison/difference.py index 0a4089a13..3917585e4 100644 --- a/CADETProcess/comparison/difference.py +++ b/CADETProcess/comparison/difference.py @@ -4,7 +4,7 @@ from warnings import warn import numpy as np -from scipy.integrate import simps +from scipy.integrate import simpson from scipy.special import expit from CADETProcess import CADETProcessError @@ -427,10 +427,10 @@ def _evaluate(self, solution): Concentration profile of simulation. """ - area_ref = simps( + area_ref = simpson( self.reference.solution, self.reference.time, axis=0 ) - area_new = simps(solution.solution, solution.time, axis=0) + area_new = simpson(solution.solution, solution.time, axis=0) return abs(area_ref - area_new)/area_ref diff --git a/CADETProcess/dataStructure/parameter.py b/CADETProcess/dataStructure/parameter.py index beb626979..b5b5d4cb4 100644 --- a/CADETProcess/dataStructure/parameter.py +++ b/CADETProcess/dataStructure/parameter.py @@ -1529,7 +1529,7 @@ def fill_values(self, dims, value): raise ValueError("Can only set single entry if n_entries == 1.") if isinstance(value, np.ndarray) and value.size == 1: - value = float(value) + value = float(value.squeeze()) if isinstance(value, (int, float)): value = n_entries * [value]