skactiveml.utils.match_signature#

skactiveml.utils.match_signature(wrapped_obj_name, func_name)[source]#

A decorator that matches the signature to a given method from a reference and hides it when the reference object does not have the wrapped function. This is especially helpful for wrapper classes whose functions should appear. This decorator is heavily inspired by the available_if decorator from sklearn.utils.metaestimators.

Parameters
wrapped_obj_namestr

The name of the object that will be wrapped.

func_namestr

The name of the function that will be wrapped.

Returns
wrapped_objcallable

The wrapped function.