tdhook._optional_deps#

Functions#

_ensure_sklearn()

Raise ImportError if scikit-learn is not installed.

requires_sklearn(func)

Decorator: raise ImportError if sklearn is missing when the decorated function is called.

Module Contents#

tdhook._optional_deps._ensure_sklearn()[source]#

Raise ImportError if scikit-learn is not installed.

Return type:

None

tdhook._optional_deps.requires_sklearn(func)[source]#

Decorator: raise ImportError if sklearn is missing when the decorated function is called.