Flower Crane
Flower Crane provides some utility functions for working with NumPy arrays.
viterbi_decode
- find the most likely path along a sequence of observations.compute_thermals
apply_time_limit
- apply a time limit to decide on base or excited statebearing_change_rate
- calculate the change rate of the bearingarg_max_positive_diff
- find two indices a, b
with b > a
which maximize arr[b] - arr[a]
find_meeting
- find indices in which four dimensional lines are close to each otherfilter
- find and replace outliers in array by comparing with running avg
Develop
First, create a new virtual env and activate it
python -m venv .venv
source .venv/bin/activate
You can install the module locally with
maturin develop
Make sure to update the python type stub in flower_crane.pyi
if you change the signature of a function.
After you have placed your PyPi API-Token in your .pypirc
file, you can publish your module with
maturin publish -r test
or
maturin publish -r pypi
Tests
python -m pytest
cargo test
Benches
To compare the performances of the different implementations, run
maturin build --release
pip install .
python -m py_flower_crane.benchratio