def __init__(self, n, npairs=5, **kwargs): """ See the documentation of `InverseLBFGS` for complete information. :keywords: :vars: List of variables participating in the quasi-Newton update. If `None`, all variables participate. """ self.on = n # Original value of n. self.vars = kwargs.get('vars', None) # None means all variables. if self.vars is None: nvars = n else: nvars = len(self.vars) # This next initialization will set self.n to nvars. # The original value of n was saved in self.on. InverseLBFGS.__init__(self, nvars, npairs, **kwargs)
def __init__(self, n, npairs=5, **kwargs): """ See the documentation of `InverseLBFGS` for complete information. :keywords: :vars: List of variables participating in the quasi-Newton update. If `None`, all variables participate. """ self.on = n # Original value of n. self.vars = kwargs.get('vars', None) # None means all variables. if self.vars is None: nvars = n else: nvars = len(self.vars) # This next initialization will set self.n to nvars. # The original value of n was saved in self.on. InverseLBFGS.__init__(self, nvars, npairs, **kwargs)
def __init__(self, n, npairs=5, **kwargs): InverseLBFGS.__init__(self, n, npairs, **kwargs)
def __init__(self, n, npairs=5, **kwargs): InverseLBFGS.__init__(self, n, npairs, **kwargs)