diff --git a/src/nmreval/data/points.py b/src/nmreval/data/points.py index cd3553a..bf9a438 100644 --- a/src/nmreval/data/points.py +++ b/src/nmreval/data/points.py @@ -484,7 +484,7 @@ class Points: return self - def set_data(self, x: np.ndarray = None, y: np.ndarray = None, y_err: np.ndarray = None, replace_mask=True) -> PointLike: + def set_data(self, x: np.ndarray = None, y: np.ndarray = None, y_err: np.ndarray | float = None, replace_mask: bool = True) -> PointLike: if x is None: x = self._x if y is None: diff --git a/src/nmreval/fit/result.py b/src/nmreval/fit/result.py index 65d340d..4d98cd8 100644 --- a/src/nmreval/fit/result.py +++ b/src/nmreval/fit/result.py @@ -387,7 +387,7 @@ class FitResult(Points): self.fun_kwargs['complex_mode'] = actual_mode - new_fit.set_data(x_values, y_values) + new_fit.set_data(x_values, y_values, y_err=0.0) return new_fit @@ -410,7 +410,7 @@ class FitResult(Points): else: part_functions.append(Points(x_values, sub_y, name=sub_name)) - if actual_mode < 0: + if actual_mode > 0: self.fun_kwargs['complex_mode'] = actual_mode return part_functions