Merge pull request #1096 from paulromano/pyapi-reaction-fix

Support IncidentNeutron.from_hdf5() for files without 'redundant'
This commit is contained in:
shikhar413 2018-10-19 08:36:39 -04:00 committed by GitHub
commit aeb145731b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 19 additions and 16 deletions

View file

@ -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",

View file

@ -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

View file

@ -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]

View file

@ -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():

View file

@ -1,4 +1,4 @@
from collections import MutableSequence
from collections.abc import MutableSequence
import warnings
import io
import copy

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,4 @@
from collections import Iterable
from collections.abc import Iterable
from numbers import Real
import copy
import sys

View file

@ -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

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python
from collections import Mapping
from collections.abc import Mapping
import os
from math import log

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python
from collections import Mapping
from collections.abc import Mapping
import os
import numpy as np

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python
from collections import Callable
from collections.abc import Callable
import os
import numpy as np