diff --git a/pyxem/signals/indexation_results.py b/pyxem/signals/indexation_results.py index 3bfb917e3..9a65f6dbd 100644 --- a/pyxem/signals/indexation_results.py +++ b/pyxem/signals/indexation_results.py @@ -1128,6 +1128,8 @@ def to_phase_map(self): raise ValueError("Only a single phase present in simulation") phase_idxs = self.to_phase_index() + # in case n_best = 1 + phase_idxs = phase_idxs.reshape(*self.axes_manager._navigation_shape_in_array, -1) colors = [p.color_rgb for p in self.simulation.phases] float_rgb = np.take(colors, phase_idxs[..., 0], axis=0)