Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZfitWrapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Heidelbach
ZfitWrapper
Commits
6cd42bc6
Commit
6cd42bc6
authored
2 months ago
by
Alexander Heidelbach
Browse files
Options
Downloads
Patches
Plain Diff
Correct class init
parent
a4ccb27c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zfitwrapper/Fitter.py
+4
-8
4 additions, 8 deletions
src/zfitwrapper/Fitter.py
with
4 additions
and
8 deletions
src/zfitwrapper/Fitter.py
+
4
−
8
View file @
6cd42bc6
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment