Skip to content

Commit

Permalink
Fixed unnecessary svd computation at the beginning of spgsolver.
Browse files Browse the repository at this point in the history
  • Loading branch information
melissawm committed Jun 20, 2018
1 parent 2a78e6a commit cef7d3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skprocrustes/skprocrustes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,8 +1003,6 @@ def spectral_setup(problem, solvername, options):
# Decide whether we are going to solve by blocks or not.

if solvername == "spg":
U, S, VT = sp.svd(problem.A)
problem.stats["svd"] = problem.stats["svd"]+1

#
# Computing starting point
Expand All @@ -1014,6 +1012,8 @@ def spectral_setup(problem, solvername, options):
# Solving this problem is equivalent to solving the original one.
# THIS IS NOT WORKING. USE CHANGEVAR = FALSE FOR BETTER
# PERFORMANCE.
U, S, VT = sp.svd(problem.A)
problem.stats["svd"] = problem.stats["svd"]+1
X = np.copy(VT[0:p, 0:n].T)
# Aorig = problem.A.copy()
Ak = np.zeros((m, n))
Expand Down

0 comments on commit cef7d3a

Please sign in to comment.