set fit toolbar a name; fixes #281

This commit is contained in:
Dominik Demuth 2024-07-15 17:42:28 +02:00
parent dd471ae294
commit a8fcd658d9
2 changed files with 7 additions and 2 deletions

View File

@ -10,7 +10,7 @@ class FitToolbar(QtWidgets.QToolBar):
limit_menu: QtWidgets.QMenu, limit_menu: QtWidgets.QMenu,
parent=None, parent=None,
): ):
super().__init__(parent=parent) super().__init__('Fit', parent=parent)
self.fit_action = fitaction self.fit_action = fitaction
self.region = RegionItem() self.region = RegionItem()

View File

@ -3,7 +3,12 @@ from ctypes import c_double, cast, pointer, c_void_p
import numpy as np import numpy as np
from scipy import LowLevelCallable 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 .base import Distribution
from ..lib.utils import ArrayLike from ..lib.utils import ArrayLike