Skip to content

Commit

Permalink
Fixed typo added TODO dwavesystems#122
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Hannie committed Mar 31, 2020
1 parent 4577ea6 commit 0fdef37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion minorminer/layout/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def p_norm(G, p=2, starting_layout=None, G_distances=None, dim=None, center=None
else:
starting_layout = nx.spectral_layout
else:
starting_layout = nx. spectral_layout
starting_layout = nx.spectral_layout

# Make a layout object
layout = Layout(G, starting_layout, dim=dim,
Expand Down Expand Up @@ -121,6 +121,7 @@ def _p_norm_objective(layout_vector, G_distances, dim, p):
# A 2d matrix of the distances between points
dist = np.linalg.norm(diff, ord=p, axis=-1)

# TODO: Compare this division-by-zero strategy to adding epsilon.
# A vectorized version of the gradient function
with np.errstate(divide='ignore', invalid='ignore'): # handle division by 0
if p == 1:
Expand Down

0 comments on commit 0fdef37

Please sign in to comment.