mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Merge pull request #1096 from paulromano/pyapi-reaction-fix
Support IncidentNeutron.from_hdf5() for files without 'redundant'
This commit is contained in:
commit
aeb145731b
14 changed files with 19 additions and 16 deletions
|
|
@ -2048,8 +2048,8 @@
|
|||
"o16 = df[df['nuclide'] == 'O16']['mean']\n",
|
||||
"\n",
|
||||
"# Cast DataFrames as NumPy arrays\n",
|
||||
"h1 = h1.as_matrix()\n",
|
||||
"o16 = o16.as_matrix()\n",
|
||||
"h1 = h1.values\n",
|
||||
"o16 = o16.values\n",
|
||||
"\n",
|
||||
"# Reshape arrays to 2D matrix for plotting\n",
|
||||
"h1.shape = (fine_groups.num_groups, fine_groups.num_groups)\n",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys
|
||||
import copy
|
||||
from collections import Iterable
|
||||
from collections.abc import Iterable
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from collections import OrderedDict, Mapping, Callable
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Mapping, Callable
|
||||
from copy import deepcopy
|
||||
from io import StringIO
|
||||
from numbers import Integral, Real
|
||||
|
|
@ -740,7 +741,7 @@ class IncidentPhoton(EqualityMixin):
|
|||
shell_values.insert(0, None)
|
||||
df = relax.transitions[shell].replace(
|
||||
shell_values, range(len(shell_values)))
|
||||
sub_group.create_dataset('transitions', data=df.as_matrix())
|
||||
sub_group.create_dataset('transitions', data=df.values)
|
||||
|
||||
# Determine threshold
|
||||
threshold = rx.xs.x[0]
|
||||
|
|
|
|||
|
|
@ -924,7 +924,7 @@ class Reaction(EqualityMixin):
|
|||
rx = cls(mt)
|
||||
rx.q_value = group.attrs['Q_value']
|
||||
rx.center_of_mass = bool(group.attrs['center_of_mass'])
|
||||
rx.redundant = bool(group.attrs['redundant'])
|
||||
rx.redundant = bool(group.attrs.get('redundant', False))
|
||||
|
||||
# Read cross section at each temperature
|
||||
for T, Tgroup in group.items():
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from collections import MutableSequence
|
||||
from collections.abc import MutableSequence
|
||||
import warnings
|
||||
import io
|
||||
import copy
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from abc import ABCMeta
|
||||
from collections import Iterable, OrderedDict
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Iterable
|
||||
import copy
|
||||
import hashlib
|
||||
from itertools import product
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from collections import Iterable
|
||||
from collections.abc import Iterable
|
||||
from numbers import Real, Integral
|
||||
from xml.etree import ElementTree as ET
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from collections import Iterable
|
||||
from collections.abc import Iterable
|
||||
from numbers import Real
|
||||
import copy
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from collections import OrderedDict, Iterable
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Iterable
|
||||
from copy import copy, deepcopy
|
||||
from numbers import Integral, Real
|
||||
import random
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from collections import Mapping
|
||||
from collections.abc import Mapping
|
||||
import os
|
||||
from math import log
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from collections import Mapping
|
||||
from collections.abc import Mapping
|
||||
import os
|
||||
|
||||
import numpy as np
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from collections import Mapping, Callable
|
||||
from collections.abc import Mapping, Callable
|
||||
import os
|
||||
|
||||
import numpy as np
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from collections import Mapping, Callable
|
||||
from collections.abc import Mapping, Callable
|
||||
import os
|
||||
|
||||
import numpy as np
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from collections import Callable
|
||||
from collections.abc import Callable
|
||||
import os
|
||||
|
||||
import numpy as np
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue