Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bayesian-parametric-population-models
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
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
Daniel Wysocki
bayesian-parametric-population-models
Commits
dfdc3511
Commit
dfdc3511
authored
6 years ago
by
Daniel Wysocki
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug in the PPD sampler
parent
74d645b0
No related branches found
Branches containing commit
Tags
pop_models_paper_bns_version
Tags containing commit
1 merge request
!13
Merging months of changes into master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pop_models/ppd.py
+1
-1
1 addition, 1 deletion
src/pop_models/ppd.py
with
1 addition
and
1 deletion
src/pop_models/ppd.py
+
1
−
1
View file @
dfdc3511
...
...
@@ -31,7 +31,7 @@ def sample_ppd(
# If ``post_weights`` is None, this is just 1/n_post, otherwise it will be
# proportional to ``post_weights``, but properly normalized to 1.0.
if
post_weights
is
None
:
weights
=
numpy
.
empty
(
n_
samples
,
dtype
=
post_samples
.
dtype
)
weights
=
numpy
.
empty
(
n_
post
,
dtype
=
post_samples
.
dtype
)
weights
[:]
=
1.0
/
n_post
else
:
weights
=
post_weights
/
numpy
.
sum
(
post_weights
)
...
...
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