mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Make sure get_pandas_dataframe() works with 1D mesh filter
This commit is contained in:
parent
b72ca4e1b1
commit
066b73e037
1 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue