mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Update openmc/stats/univariate.py
better naming Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
9dc9b2af45
commit
0b3cd2544b
1 changed files with 6 additions and 7 deletions
|
|
@ -850,11 +850,10 @@ class Mixture(Univariate):
|
|||
Mixture distribution generated from XML element
|
||||
|
||||
"""
|
||||
P = []
|
||||
D = []
|
||||
for pair in elem:
|
||||
if pair.tag == "pair":
|
||||
P.append( float(get_text(pair, 'probability')) )
|
||||
D.append( Univariate.from_xml_element(pair.find("dist")) )
|
||||
probability = []
|
||||
distribution = []
|
||||
for pair in elem.findall('pair'):
|
||||
probability.append(float(get_text(pair, 'probability')))
|
||||
distribution.append(Univariate.from_xml_element(pair.find("dist")))
|
||||
|
||||
return cls(P,D)
|
||||
return cls(probability, distribution)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue