Skip to content
Snippets Groups Projects
Commit 6cd42bc6 authored by Alexander Heidelbach's avatar Alexander Heidelbach
Browse files

Correct class init

parent a4ccb27c
Branches
No related tags found
No related merge requests found
......@@ -3,7 +3,6 @@ import numpy as np
import zfit
import zfit.core
from .Models import Model
from .BaseFitter import BaseFitter
__all__ = ["Fitter", "HistFitter"]
......@@ -13,13 +12,11 @@ class Fitter(BaseFitter):
def __init__(
self,
array: np.ndarray,
model: Model,
weights: Optional[np.ndarray] = None,
retry: int = 10,
*args,
**kwargs,
) -> None:
super().__init__(model=model, retry=retry, *args, **kwargs)
super().__init__(*args, **kwargs)
self.array = array
self.weights = weights
......@@ -51,6 +48,7 @@ class Fitter(BaseFitter):
pdf = self.model.model
if self.truncated_limits:
if len(self.truncated_limits) > 1:
assert isinstance(self.truncated_limits, list)
new_range = [
zfit.Space(
obs=self.model.obs,
......@@ -82,10 +80,8 @@ class Fitter(BaseFitter):
class HistFitter(BaseFitter):
def __init__(
self, counts: np.ndarray, model: Model, retry: int = 10, *args, **kwargs
) -> None:
super().__init__(model=model, retry=retry, *args, **kwargs)
def __init__(self, counts: np.ndarray, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
self.counts = counts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment