Skip to content

Commit

Permalink
GUI bugfix
Browse files Browse the repository at this point in the history
prevent error when loading a previous GUI state without waypoint
  • Loading branch information
DEGIACOMI committed Aug 4, 2023
1 parent fafeab7 commit 379b238
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/molearn/analysis/GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ def update_trails(self):

# update latent space plot
if len(self.samples) == 0:
self.latent.data[2].x = self.waypoints[:, 0]
self.latent.data[2].y = self.waypoints[:, 1]
if len(self.waypoints)>0:
self.latent.data[2].x = self.waypoints[:, 0]
self.latent.data[2].y = self.waypoints[:, 1]
else:
self.latent.data[2].x = self.samples[:, 0]
self.latent.data[2].y = self.samples[:, 1]
Expand Down

0 comments on commit 379b238

Please sign in to comment.