Skip to content

Commit 42c1bc3

Browse files
authored
Merge pull request #5260 from vivi235711/bugfix-gamer_reshape
Fix gamer frontend: single-grid case by reshape instead of squeeze
2 parents ed0adde + a64b2a1 commit 42c1bc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

yt/frontends/gamer/data_structures.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ def _parse_index(self):
108108
# (see _read_particle_coords and _read_particle_fields in io.py)
109109
self._particle_indices = np.zeros(self.num_grids + 1, dtype="int64")
110110
np.add.accumulate(
111-
self.grid_particle_count.squeeze(), out=self._particle_indices[1:]
111+
self.grid_particle_count.reshape(self.num_grids),
112+
out=self._particle_indices[1:],
112113
)
113114

114115
def _populate_grid_objects(self):

0 commit comments

Comments
 (0)