https://github.com/betatim/scikit-image-backend-phony
A simple scikit-image backend
https://github.com/betatim/scikit-image-backend-phony
Last synced: about 2 months ago
JSON representation
A simple scikit-image backend
- Host: GitHub
- URL: https://github.com/betatim/scikit-image-backend-phony
- Owner: betatim
- License: bsd-3-clause
- Created: 2024-08-31T07:43:30.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-23T13:12:20.000Z (12 months ago)
- Last Synced: 2025-08-20T03:04:32.235Z (about 2 months ago)
- Language: Python
- Size: 22.5 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# scikit-image-backend-phony
This repository contains an example scikit-image backend. The goal of this
backend is to provide a basic implementation that can be used to test the
dispatching mechanism and serve as documentation of how the dispatching
mehanism in scikit-image works.This backend only implements one function,
`skimage.metrics.mean_squared_error`. This keeps things straightforward
when reading the code.> This repository should be moved to the scikit-image GitHub org at some
> point.## Installing
To install this backend checkout the repository and run
```
pip install -e.
```## Using it
After installing the backend it will automatically be used for the function
that the backend implements:```python
import numpy as np
from skimage.metrics import mean_squared_errormean_squared_error(np.asarray([0.,0.5]), np.asarray([0., 0.9]))
```If the backend was used a warning will be emitted telling you so:
```
DispatchNotification: Call to 'skimage.metrics.simple_metrics.mean_squared_error' was dispatched to the 'phony' backend. Set SKIMAGE_NO_DISPATCHING=1 to disable this.
```