Skip to main content

complexeva

complexeva logo

Fast, low-memory complexity measures for 1D time series (EEG, MEG, physiology).

pip install complexeva  # Python 3.14+
import numpy
import complexeva

signal = numpy.random.randn(1000)   # one signal, shape (time,)
complexeva.hfd(signal)              # one float

batches

Pass every signal at once with time on the last axis; you get one value per signal, in the shape of the other axes. Each value is identical to calling the measure on that signal alone.

eeg = numpy.random.randn(64, 1000)              # (channels, time)
complexeva.hfd(eeg)                             # shape (64,)

study = numpy.random.randn(20, 64, 1000)        # (subjects, channels, time)
complexeva.sample_entropy(study)                # shape (20, 64)

recording = numpy.random.randn(1000, 64)        # time first? put time last
complexeva.dfa(recording.T)                     # shape (64,)

windows = numpy.lib.stride_tricks.sliding_window_view(signal, 200)[::10]  # (windows, 200), no copy
complexeva.permutation_entropy(windows)         # one value per window

Batches work for hfd, dfa, permutation_entropy, sample_entropy and numeric lempel_ziv; the rest take one signal. A non-finite sample raises an error naming its full index; a constant signal gives NaN in its place. NUMBA_NUM_THREADS limits the threads.

measures

measure input paper
Higuchi fractal dimension
hfd, hfd_hilbert
(…, time) numeric; hfd_hilbert 1D Higuchi 1988; Varley 2020
Lempel–Ziv complexity
lempel_ziv, lempel_ziv_hilbert
(…, time) numeric; Hilbert and binary string 1D Kaspar & Schuster 1987; Schartner 2017
sample entropy
sample_entropy
(…, time) numeric Richman & Moorman 2000
permutation entropy
permutation_entropy
(…, time) numeric Bandt & Pompe 2002
detrended fluctuation analysis
dfa
(…, time) numeric Peng 1994
largest Lyapunov exponent
lyapunov_exponent
1D numeric Rosenstein 1993
compression complexity
compression_complexity
1D array Cilibrasi & Vitányi 2005

speed and memory vs other packages

Ratio of each other package's time and peak heap to complexeva's, per measure at N = 1k, 10k and 100k; above 1 favours complexeva.

Batches, against a loop of antropy calls (NUMBA_NUM_THREADS sets the thread count):

Ratio of an antropy loop's time and peak heap to complexeva's batch call for five measures at three shapes, with 16 threads; above 1 favours complexeva.

validation

Higuchi fractal dimension follows the theoretical fBm dimension from 1.9 to 1.1 as the Hurst exponent increases.

Normalized Lempel–Ziv complexity is low for a sine wave and near one for white noise, with signal excerpts alongside.

licence

MIT

Metadata

Release files for complexeva 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for complexeva 0.5.0
File Size Uploaded Provenance Actions
complexeva-0.5.0.tar.gz 41.6 kB With provenance Details for complexeva-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for complexeva 0.5.0
File Interpreter ABI Platform Actions
complexeva-0.5.0-py3-none-any.whl Python 3 none any Details for complexeva-0.5.0-py3-none-any.whl

Total release size: 69.9 kB

Release files / complexeva-0.5.0.tar.gz

Download URL complexeva-0.5.0.tar.gz
Size 41.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f766949319f013d8ed56d4328f3f08c1e9593b672a89275d78662cbff53ea0c3
BLAKE2b-256 checksum
How to use checksums
55a1a74e3a2aa0ba5303b71f6812481bcbb64e08aa3cc06c7f4797330ab5d661
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / complexeva-0.5.0-py3-none-any.whl

Download URL complexeva-0.5.0-py3-none-any.whl
Size 28.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
735fb2902c1e16e86e331d01eb4e4f2ef2377d250146cb4cab8f8cf1a93c8311
BLAKE2b-256 checksum
How to use checksums
b698b3eadbeeb97e29d191710651f792c3026aa7ba90b2c99d289acf1a705e46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for complexeva 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for complexeva-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page