From 1aaf24bc4d69baefb68298d1aa2b1caa0fcca8e8 Mon Sep 17 00:00:00 2001 From: Will Boyd Date: Thu, 15 Oct 2015 16:06:32 -0400 Subject: [PATCH] MGXS.get_xs(...) routine now ensures that return value is at least a 1D numpy array --- openmc/mgxs/mgxs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 57a8aa046..d4e368af5 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -668,6 +668,7 @@ class MGXS(object): # Eliminate trivial dimensions xs = np.squeeze(xs) + xs = np.atleast_1d(xs) return xs @@ -1790,6 +1791,7 @@ class ScatterMatrixXS(MGXS): # Eliminate trivial dimensions xs = np.squeeze(xs) + xs = np.atleast_2d(xs) return xs @@ -2121,6 +2123,7 @@ class Chi(MGXS): # Eliminate trivial dimensions xs = np.squeeze(xs) + xs = np.atleast_1d(xs) xs = np.nan_to_num(xs) return xs