cogpy.utils.imports

Optional dependency helpers.

Provides import_optional() which gives a clear error message when an optional dependency is missing, directing the user to the right pip install cogpy[extra] command.

Functions

import_optional(name, *[, extra])

Import an optional dependency, raising a helpful error if missing.