Dispatching
The dispatching mechanism allows users to use alternative implementations of the algorithms available in scikit-image. The alternative implementations are provided by separate Python packages maintained outside of scikit-image. Example use-cases are support for array libraries other than NumPy or optimized implementations for particular hardware.
This section of the documentation describes how to create an alternative implementation (a “backend”) and how the dispatching mechanism in scikit-image works.
Creating a scikit-image backend
An alternative implementation (“backend”) is a good place to provide optimized implementations for particular hardware, to support array libraries other than NumPy, or to explore novel ideas that are not (yet) a good fit for the core scikit-image library.
To create a backend you have to create a new Python package that registers two particular entry points: * should resolve to a function with no arguments that returns an instance of the class or something that behaves like it; * should resolve to a namespace that contains two functions: and .