Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

probs arg ignored if openmc.stats.Normal passed to openmc.stats.combine_distributions #3105

Open
shimwell opened this issue Aug 1, 2024 · 0 comments
Labels

Comments

@shimwell
Copy link
Member

shimwell commented Aug 1, 2024

when making use of openmc.stats.combine_distributions the type hint indicate that probs can be a Sequence[Univariate] but the doc string only mentions openmc.stats.Discrete and openmc.stats.Tabular.

Passing in two openmc.stats.Normal does not raise any errors and returns a Mixture. However the probabilities of the Mixture are set to 1. ,1. even if the users specifies [0.3,0.8]

minimal example

import openmc
norm1=openmc.stats.Normal(mean_value=10, std_dev=1)
norm2=openmc.stats.Normal(mean_value=1, std_dev=1)
combo=openmc.stats.combine_distributions([norm1,norm2],probs=[0.1,0.9])
combo.probability
>>> [1.0, 1.0]
@shimwell shimwell added the Bugs label Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant