Skip to content

Commit 357a5b4

Browse files
authored
Avoid setting shape on numpy directly (openmc-dev#183)
1 parent f165c2d commit 357a5b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎openmc_plotter/plotmodel.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ def makePlot(self, view: Optional["PlotView"] = None,
573573
domain[_NOT_FOUND] = DomainView(_NOT_FOUND, "Not Found", cv.domainBackground)
574574
u, inv = np.unique(self.ids, return_inverse=True)
575575
image = np.array([domain[id].color for id in u])[inv]
576-
image.shape = (cv.v_res, cv.h_res, 3)
576+
image = image.reshape(cv.v_res, cv.h_res, 3)
577577

578578
if cv.masking:
579579
for id, dom in domain.items():

0 commit comments

Comments
 (0)