Skip to content

Commit

Permalink
Solution to passing argument was obvious: rename the option within fr…
Browse files Browse the repository at this point in the history
…amework
  • Loading branch information
Andrew Lambe committed Jul 3, 2012
1 parent aa4bc95 commit 4c5885b
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions nlpy/optimize/solvers/auglag2.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,7 @@ class AugmentedLagrangianLbfgs(AugmentedLagrangian):

def __init__(self, nlp, **kwargs):
AugmentedLagrangian.__init__(self, nlp, **kwargs)
# Surely there's a faster way to do this ...
if 'npairs' in kwargs:
npairs = kwargs['npairs']
del kwargs['npairs']
else:
npairs = 5
self.Hessapp = LBFGS(self.n, npairs=npairs, **kwargs)
self.Hessapp = LBFGS(self.n, npairs=kwargs.get('qn_pairs',5), **kwargs)


def hprod(self, x, z, v, **kwargs):
Expand Down Expand Up @@ -304,12 +298,7 @@ class AugmentedLagrangianLsr1(AugmentedLagrangianLbfgs):

def __init__(self, nlp, **kwargs):
AugmentedLagrangian.__init__(self, nlp, **kwargs)
if 'npairs' in kwargs:
npairs = kwargs['npairs']
del kwargs['npairs']
else:
npairs = 5
self.Hessapp = LSR1(self.n, npairs=npairs, **kwargs)
self.Hessapp = LSR1(self.n, npairs=kwargs.get('qn_pairs',5), **kwargs)


# end class
Expand Down

0 comments on commit 4c5885b

Please sign in to comment.