mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Apply suggestions from @drewejohnson code review
Co-Authored-By: Andrew Johnson <drewej@protonmail.com>
This commit is contained in:
parent
9fffaa0c26
commit
4ad2ad3ab8
3 changed files with 5 additions and 5 deletions
|
|
@ -19,7 +19,7 @@ def check_type(name, value, expected_type, expected_iter_type=None, *, none_ok=F
|
|||
expected_iter_type : type or Iterable of type or None, optional
|
||||
Expected type of each element in value, assuming it is iterable. If
|
||||
None, no check will be performed.
|
||||
none_ok : bool
|
||||
none_ok : bool, optional
|
||||
Whether None is allowed as a value
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -794,10 +794,10 @@ class Material(IDManagerMixin):
|
|||
xml_element = ET.Element("nuclide")
|
||||
xml_element.set("name", nuclide[0])
|
||||
|
||||
if nuclide[2] == 'ao':
|
||||
xml_element.set("ao", str(nuclide[1]))
|
||||
if nuclide.percent_type == 'ao':
|
||||
xml_element.set("ao", str(nuclide.percent))
|
||||
else:
|
||||
xml_element.set("wo", str(nuclide[1]))
|
||||
xml_element.set("wo", str(nuclide.percent))
|
||||
|
||||
return xml_element
|
||||
|
||||
|
|
|
|||
|
|
@ -1097,7 +1097,7 @@ class Tally(IDManagerMixin):
|
|||
return np.arange(self.num_nuclides)
|
||||
|
||||
# Determine the score indices from any of the requested scores
|
||||
nuclide_indices = np.zeros(len(nuclides), dtype=int)
|
||||
nuclide_indices = np.zeros_like(nuclides, dtype=int)
|
||||
for i, nuclide in enumerate(nuclides):
|
||||
nuclide_indices[i] = self.get_nuclide_index(nuclide)
|
||||
return nuclide_indices
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue