Skip to content

Commit

Permalink
fixed structure_designer
Browse files Browse the repository at this point in the history
  • Loading branch information
freude committed Jul 5, 2020
1 parent fbc50db commit 1f9b198
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nanonet/tb/structure_designer.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def _sort(self, labels, coords):
mat=h_matrix)

self.reorder = indices
if isinstance(self.left_lead, list) or isinstance(self.left_lead, np.ndarray) :
if isinstance(self.left_lead, list) or isinstance(self.left_lead, np.ndarray) and len(self.left_lead) > 0:
self.left_lead = np.squeeze(np.concatenate([np.where(indices == item) for item in self.left_lead]))
if isinstance(self.right_lead, list) or isinstance(self.right_lead, np.ndarray) :
if isinstance(self.right_lead, list) or isinstance(self.right_lead, np.ndarray) and len(self.left_lead) > 0:
self.right_lead = np.squeeze(np.concatenate([np.where(indices == item) for item in self.right_lead]))
coords = coords[indices]
labels = [labels[i] for i in indices]
Expand Down

0 comments on commit 1f9b198

Please sign in to comment.