Skip to content

Commit

Permalink
Fixed bug in initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffrey-hokanson committed Oct 1, 2020
1 parent 3193db6 commit 469c03e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion psdr/initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ def initialize_subspace(X = None, fX = None, grads = None, n_grads = 100):
r""" Construct an initial estimate of the desired subspace
"""

ngrads = max(n_grads, X.shape[1])

X, fX, grads = check_sample_inputs(X, fX, grads)
ngrads = max(n_grads, X.shape[1])
# If we don't have enough grads and we have enough samples to estimate gradients
if len(grads) < n_grads and X.shape[0] >= X.shape[1]+1:
# Pick a random subset to estimate the gradient at
Expand Down

0 comments on commit 469c03e

Please sign in to comment.