From a8fcd658d90c3ed17311431a1a326eae773ac682 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Mon, 15 Jul 2024 17:42:28 +0200 Subject: [PATCH] set fit toolbar a name; fixes #281 --- src/gui_qt/fit/fit_toolbar.py | 2 +- src/nmreval/distributions/energy.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui_qt/fit/fit_toolbar.py b/src/gui_qt/fit/fit_toolbar.py index 283c335..74ed526 100644 --- a/src/gui_qt/fit/fit_toolbar.py +++ b/src/gui_qt/fit/fit_toolbar.py @@ -10,7 +10,7 @@ class FitToolbar(QtWidgets.QToolBar): limit_menu: QtWidgets.QMenu, parent=None, ): - super().__init__(parent=parent) + super().__init__('Fit', parent=parent) self.fit_action = fitaction self.region = RegionItem() diff --git a/src/nmreval/distributions/energy.py b/src/nmreval/distributions/energy.py index 40f4c7f..059b2a5 100644 --- a/src/nmreval/distributions/energy.py +++ b/src/nmreval/distributions/energy.py @@ -3,7 +3,12 @@ from ctypes import c_double, cast, pointer, c_void_p import numpy as np from scipy import LowLevelCallable -from scipy.integrate import quad, simps as simpson + +from scipy.integrate import quad +try: + from scipy.integrate import simps as simpson +except ImportError: + from scipy.integrate import simpson from .base import Distribution from ..lib.utils import ArrayLike