neuralqx.utils.module.optional_dependency module

This file contains logic for checking for optional dependencies of the package

NOTE: part(s) of, or the entire content, of this file is obtained from NetKet’s source code

the original copyright mentioned above applies.

import_optional_dep(name, minimum_version='', reason='')

A function that attempts to import a library with the given name. An error is raised if unsuccessful

Parameters:
  • name (str) – the name of the library to be imported

  • minimum_version (str) – the minimum version required

  • reason (str) – the reason why this library is required

Return type:

ModuleType