Skip to content

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

Open
@shimwell

Description

@shimwell

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions