Skip to content

Commit

Permalink
Rename to partial_inverse.
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Semmler committed Sep 1, 2023
1 parent 6dee93d commit 98c5683
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pydvl/utils/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def score(self, x: NDArray, y: NDArray) -> float:
pass


def call_fun_remove_arg(*args, fn: Callable, arg: str, **kwargs):
def partial_inverse(*args, fn: Callable, arg: str, **kwargs):
"""
Calls the given function with the given arguments. In the process it removes the
specified keyword argument from the keyword arguments.
Expand Down Expand Up @@ -86,7 +86,7 @@ def maybe_add_argument(fun: Callable, new_arg: str) -> Callable:
if new_arg in get_free_args_fn(fun):
return fun

return functools.partial(call_fun_remove_arg, fn=fun, arg=new_arg)
return functools.partial(partial_inverse, fn=fun, arg=new_arg)


class NoPublicConstructor(ABCMeta):
Expand Down

0 comments on commit 98c5683

Please sign in to comment.