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 every measure except lyapunov_exponent, compression_complexity, the _hilbert variants and binary-string lempel_ziv, which take one signal. multiscale_entropy adds a last axis of scales, and hjorth returns a (mobility, complexity) pair of arrays. 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) Higuchi 1988
cited by
Varley 2020
cited by
Katz fractal dimension
katz_fd
(…, time) Katz 1988
cited by
Petrosian fractal dimension
petrosian_fd
(…, time) Petrosian 1995
cited by
Lempel–Ziv complexity
lempel_ziv, lempel_ziv_hilbert
(…, time) Kaspar & Schuster 1987
cited by
Schartner 2017
cited by
sample entropy
sample_entropy
(…, time) Richman & Moorman 2000
cited by
approximate entropy
approximate_entropy
(…, time) Pincus 1991
cited by
multiscale entropy
multiscale_entropy
(…, time) Costa 2002
cited by
Wu 2013 (method="modified")
cited by
fuzzy entropy
fuzzy_entropy
(…, time) Chen 2007
cited by
permutation entropy
permutation_entropy
(…, time) Bandt & Pompe 2002
cited by
spectral entropy
spectral_entropy
(…, time) Inouye 1991
cited by
SVD entropy
svd_entropy
(…, time) Roberts 1999
cited by
detrended fluctuation analysis
dfa
(…, time) Peng 1994
cited by
correlation dimension
correlation_dimension
(…, time) Grassberger & Procaccia 1983
cited by
Hjorth mobility and complexity
hjorth
(…, time) Hjorth 1970
cited by
largest Lyapunov exponent
lyapunov_exponent
1D Rosenstein 1993
cited by
compression complexity
compression_complexity
1D Cilibrasi & Vitányi 2005
cited by

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 the best other package (NUMBA_NUM_THREADS sets the thread count):

Ratio of the best other package loop's time and peak heap to complexeva's batch call for each measure 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.6.2

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.6.2
File Size Uploaded Provenance Actions
complexeva-0.6.2.tar.gz 74.7 kB With provenance Details for complexeva-0.6.2.tar.gz

Built distribution (wheel)

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

Total release size: 129.6 kB

Release files / complexeva-0.6.2.tar.gz

Download URL complexeva-0.6.2.tar.gz
Size 74.7 kB
Tags Source
SHA-256 checksum
How to use checksums
935e5172e5ac86f1824629c5172d96b9800039708fb09c97d7569657e8647419
BLAKE2b-256 checksum
How to use checksums
4ab8fc5407f091c1245fee839ec9650d6a0c8216c72bc24867fcd0d5a9c29f09
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 Nov 1, 2026.

Transparency log

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

Download URL complexeva-0.6.2-py3-none-any.whl
Size 54.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5544f4aeb1e959fb5dd9d9e669ad0978a483f4443b92dacdd7625d94ee1f07ce
BLAKE2b-256 checksum
How to use checksums
b894f67a14a0dc7c7d51b8d4b1a285230043e532df5dd19e2628bed6214205fe
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 Nov 1, 2026.

Transparency log

Security for complexeva 0.6.2

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.6.2.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 Nov 1, 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