From 066b73e03710d018d0902221082e96b8dbc0555e Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 25 Apr 2017 07:05:05 -0500 Subject: [PATCH] Make sure get_pandas_dataframe() works with 1D mesh filter --- openmc/filter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openmc/filter.py b/openmc/filter.py index 676bc66e17..526ee52e5a 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -777,9 +777,12 @@ class MeshFilter(Filter): # Find mesh dimensions - use 3D indices for simplicity if len(self.mesh.dimension) == 3: nx, ny, nz = self.mesh.dimension - else: + elif len(self.mesh.dimension) == 2: nx, ny = self.mesh.dimension nz = 1 + else: + nx = self.mesh.dimension + ny = nz = 1 # Generate multi-index sub-column for x-axis filter_bins = np.arange(1, nx + 1)