Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
lscsoft
bilby
Commits
d201ebce
Commit
d201ebce
authored
6 years ago
by
Moritz Huebner
Browse files
Options
Downloads
Patches
Plain Diff
Moritz Huebner: renamed previously introduced method and fixed some issue
parent
a4e681cc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tupak/prior.py
+8
-4
8 additions, 4 deletions
tupak/prior.py
with
8 additions
and
4 deletions
tupak/prior.py
+
8
−
4
View file @
d201ebce
...
...
@@ -73,10 +73,10 @@ class Prior(object):
prior_name
=
self
.
__class__
.
__name__
keys
=
[
'
name
'
,
'
_Prior__latex_label
'
,
'
_Interped__minimum
'
,
'
_Interped__maximum
'
]
names
=
[
'
name
'
,
'
latex_label
'
,
'
minimum
'
,
'
maximum
'
]
args
=
self
.
__
repr_
_
format_helper
(
keys
,
names
)
args
=
self
.
repr_format_helper
(
keys
,
names
)
return
"
{}({})
"
.
format
(
prior_name
,
args
)
def
__
repr_
_
format_helper
(
self
,
keys
,
names
):
def
repr_format_helper
(
self
,
keys
,
names
):
string_keys
=
[]
string_names
=
[]
non_string_keys
=
[]
...
...
@@ -91,7 +91,9 @@ class Prior(object):
args
=
'
,
'
.
join
([
'
{}={}
'
.
format
(
name
,
'
\"
'
+
self
.
__dict__
[
key
]
+
'
\"
'
)
for
key
,
name
in
zip
(
string_keys
,
string_names
)])
args
=
args
+
'
,
'
+
'
,
'
.
join
([
'
{}={}
'
.
format
(
name
,
self
.
__dict__
[
key
])
if
len
(
string_keys
)
>
0
:
args
=
args
+
'
,
'
args
=
args
+
'
,
'
.
join
([
'
{}={}
'
.
format
(
name
,
self
.
__dict__
[
key
])
for
key
,
name
in
zip
(
non_string_keys
,
non_string_names
)])
return
args
...
...
@@ -348,10 +350,12 @@ class Interped(Prior):
return
rescaled
def
__repr__
(
self
):
super_repr
=
Prior
.
__repr__
(
self
).
rstrip
(
'
)
'
).
__add__
(
'
,
'
)
super_repr
=
Prior
.
__repr__
(
self
).
rstrip
(
'
)
'
).
__add__
(
'
,
'
)
args
=
'
,
'
.
join
([
'
{}={}
'
.
format
(
name
,
self
.
__dict__
[
key
])
for
key
,
name
in
zip
([
'
xx
'
,
'
yy
'
],
[
'
xx
'
,
'
yy
'
])])
args
=
Prior
.
repr_format_helper
(
self
,
keys
=
[
'
xx
'
,
'
yy
'
],
names
=
[
'
xx
'
,
'
yy
'
])
return
super_repr
+
args
+
"
)
"
@property
def
minimum
(
self
):
return
self
.
__minimum
...
...
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