mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
MGXS.get_xs(...) routine now ensures that return value is at least a 1D numpy array
This commit is contained in:
parent
f35a68a2c7
commit
1aaf24bc4d
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue