Skip to main content

complexeva

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.

potential icons

A B C
icon option A icon option B icon option C

licence

MIT

Metadata

Release files for complexeva 0.4.1

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.4.1
File Size Uploaded Provenance Actions
complexeva-0.4.1.tar.gz 42.2 kB With provenance Details for complexeva-0.4.1.tar.gz

Built distribution (wheel)

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

Total release size: 71.3 kB

Release files / complexeva-0.4.1.tar.gz

Download URL complexeva-0.4.1.tar.gz
Size 42.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1b9e9730cf62ea888b6f23deb1ff9bb7be9d7ea3e0ca92d912ca182ac9189269
BLAKE2b-256 checksum
How to use checksums
049dba9e929bc7ab746ee9b485302ecdacc2c9fb53dabc462a495c96a4f91f78
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 30, 2026.

Transparency log

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

Download URL complexeva-0.4.1-py3-none-any.whl
Size 29.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
293bf4806e2e7d13a20ea3edff938bca66e07f593cf0e8f276b20cacf61cac4a
BLAKE2b-256 checksum
How to use checksums
404f13d762951d565f1a3bf8e13526a82106388b3db279907f892a3193448d52
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 30, 2026.

Transparency log

Security for complexeva 0.4.1

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.4.1.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 30, 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