Skip to main content

A rust implementation of dynamic time warping with python bindings!

Project description


RustDTW

Python extension backed by a multi-threaded Rust implementation of Dynamic Time Warping (DTW).


⚡️ Quick Installation

To install rustDTW, simply:

pip install rust-dtw

Example Usage

rustDTW was designed for usage with timeseries data from functional brain regions. However any data represented as a numpy matrix can be provided.

import numpy as np
import rust_dtw
  
rust_dtw.dtw(
  s=np.array([0., 1., 2.]), 
  t=np.array([3., 4., 5.]), 
  window=50, 
  distance_mode="euclidean"
  )
>>> 5.0990195

Developing

Built With

  • PyO3
  • Maturin
  • rust-numpy
  • Rayon

Setting up Dev

Here's a brief intro about what a developer must do in order to start developing the project further:

git clone https://github.com/FL33TW00D/rustDTW.git
cd rust-dtw/
./build.sh

Tests

All tests are implemented using pytest.

poetry run pytest

📈 Performance

How well does the Rust implementation stack up against some other Python/C versions.

⚠️ License

rustDTW is free and open-source software licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

rust_dtw-0.1.12-cp39-none-win_amd64.whl (373.5 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

rust_dtw-0.1.12-cp39-cp39-manylinux_2_24_x86_64.whl (436.2 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

rust_dtw-0.1.12-cp39-cp39-macosx_10_7_x86_64.whl (401.2 kB view hashes)

Uploaded CPython 3.9 macOS 10.7+ x86-64

rust_dtw-0.1.12-cp38-none-win_amd64.whl (373.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

rust_dtw-0.1.12-cp38-cp38-manylinux_2_24_x86_64.whl (436.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64

rust_dtw-0.1.12-cp38-cp38-macosx_10_7_x86_64.whl (401.3 kB view hashes)

Uploaded CPython 3.8 macOS 10.7+ x86-64

rust_dtw-0.1.12-cp37-none-win_amd64.whl (373.1 kB view hashes)

Uploaded CPython 3.7 Windows x86-64

rust_dtw-0.1.12-cp37-cp37m-manylinux_2_24_x86_64.whl (436.3 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.24+ x86-64

rust_dtw-0.1.12-cp37-cp37m-macosx_10_7_x86_64.whl (401.4 kB view hashes)

Uploaded CPython 3.7m macOS 10.7+ x86-64

rust_dtw-0.1.12-cp36-none-win_amd64.whl (373.1 kB view hashes)

Uploaded CPython 3.6 Windows x86-64

rust_dtw-0.1.12-cp36-cp36m-manylinux_2_24_x86_64.whl (436.4 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.24+ x86-64

rust_dtw-0.1.12-cp36-cp36m-macosx_10_7_x86_64.whl (401.5 kB view hashes)

Uploaded CPython 3.6m macOS 10.7+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page