From 9bf4d162429e5554608414b87b991843584efa47 Mon Sep 17 00:00:00 2001 From: Nick Papior Date: Sat, 11 Feb 2023 20:22:48 +0100 Subject: [PATCH] bug: fixed changes in argument handling for mixers Signed-off-by: Nick Papior --- sisl/mixing/base.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sisl/mixing/base.py b/sisl/mixing/base.py index 2bce17e4cc..b51588601a 100644 --- a/sisl/mixing/base.py +++ b/sisl/mixing/base.py @@ -89,11 +89,11 @@ def __init__(self, op: Callable[[Any, Any], Any], A: Any, B: Any): def __call__(self, f: T, df: T, *args: Any, **kwargs: Any) -> T: if isinstance(self.A, BaseMixer): - A = self.A(*args, **kwargs) + A = self.A(f, df, *args, **kwargs) else: A = self.A if isinstance(self.B, BaseMixer): - B = self.B(*args, **kwargs) + B = self.B(f, df, *args, **kwargs) else: B = self.B return self._op(A, B) @@ -157,7 +157,7 @@ def __repr__(self) -> str: def __call__(self, f: T, df: T, *args: Any, append: bool = True) -> None: - """ Append data to thMix quantities based on arguments """ + """ Append data to the history (omitting None values)! """ if not append: # do nothing return @@ -166,7 +166,7 @@ def __call__(self, f: T, df: T, *args: Any, append: bool = True) -> None: args = list(filter(lambda arg: arg is not None, args)) # append *args - self.history.append(*args) + self.history.append(f, df, *args) @property def history(self) -> TypeHistory: @@ -252,7 +252,7 @@ def mixer(self) -> TypeBaseMixer: def __call__(self, f: T, df: T, *args: Any, **kwargs: Any) -> T: """ Apply the mixing routine """ - return self.next()(*args, **kwargs) + return self.next()(f, df, *args, **kwargs) def __getattr__(self, attr: str) -> Any: """ Divert all unknown attributes to the current mixer