Skip to main content

Fast path signatures

Project description

chen-signatures

Fast rough path signatures for Python, powered by a high-performance Julia backend.

PyPI Python

chen-signatures brings the speed and numerical stability of Julia’s ChenSignatures.jl to Python via juliacall, offering a modern, actively maintained alternative to existing signature libraries.

It has been benchmarked against both iisignature and pysiglib, showing:

  • Comparable performance to pysiglib, a modern C++/Python implementation
  • Consistently faster performance than iisignature across typical configurations

Full benchmark notebooks and articles will be published separately.


Installation

pip install chen-signatures

On first import, juliacall will automatically install a lightweight Julia runtime. This happens once per environment.


Quick Start

import chen
import numpy as np

path = np.random.randn(1000, 10)

signature = chen.sig(path, m=5)
logsignature = chen.logsig(path, m=5)

API

sig(path, m)

Compute a truncated signature up to level m.

sig = chen.sig(path, m=3)

logsig(path, m)

Compute log-signatures using the Lyndon basis.

logsig = chen.logsig(path, m=5)

Supported Types

  • float32, float64
  • Any NumPy array-like input
  • Contiguous arrays recommended (handled automatically)

Use Cases

  • Financial time series
  • Sensor data and IoT
  • Neural CDEs / differential ML
  • Representation learning
  • Anomaly detection

Limitations

  • First import is slow (Julia installation)
  • CPU-only execution
  • Uses more memory than minimal C++ libraries

Requirements

  • Python ≥ 3.9
  • NumPy ≥ 1.20
  • ~500MB disk space for Julia runtime

Citation

@software{chen_signatures,
  author = {Combi, Alessandro},
  title = {chen-signatures: Fast rough path signatures for Python},
  year = {2025},
  url = {https://github.com/aleCombi/ChenSignatures.jl}
}

Contributing

https://github.com/aleCombi/ChenSignatures.jl

Project details


Download files

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

Source Distribution

chen_signatures-0.2.3.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chen_signatures-0.2.3-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file chen_signatures-0.2.3.tar.gz.

File metadata

  • Download URL: chen_signatures-0.2.3.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for chen_signatures-0.2.3.tar.gz
Algorithm Hash digest
SHA256 c1a1e05e1dc210d1f99b369e96affae8fc098e4be4d7ca1e05e910b5fa51c700
MD5 01534f4cc5080ac3d7c409325ea547c0
BLAKE2b-256 f948603e89f7cb7bab2ebd65385356d786c96fa83b4c23bd4f11f524d3330fe0

See more details on using hashes here.

File details

Details for the file chen_signatures-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for chen_signatures-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 153f59c4e87044e7eb097f2e4ef9a89b7092ddc8f0987406f3d40177139bf328
MD5 5c817f256d24ddb61250950fb1176c5f
BLAKE2b-256 affdfb3ecdf5fb9ef239e914a1e3342a538b260e737c2c604fcde85bdd8797ee

See more details on using hashes here.

Supported by

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