skillfed

antropy

AntroPy: entropy and complexity of time-series in Python

antropy v0.2.2 195.9K downloads/30d#9,803 on PyPI377
Permissive license BSD (3-clause) Active released

What it is and what it does

AntroPy is a Python library for extracting entropy and fractal dimension features from time-series data. It provides functions for computing permutation entropy, spectral entropy, sample entropy, approximate entropy, Lempel-Ziv complexity, and fractal dimensions (Petrosian, Katz, Higuchi, and detrended fluctuation analysis). The library is designed for speed through Numba JIT compilation and handles both single 1-D arrays and multi-channel N-D arrays in a single call.

Typical use cases include feature extraction from physiological signals like EEG, ECG, and EMG for signal processing research and analysis. The package depends on numpy, scipy, scikit-learn, and numba, and is actively maintained with support for Python 3.10 through 3.13.

Use it for:

  • Extract entropy features from EEG recordings for brain activity classification or sleep stage detection
  • Compute fractal dimension measures from ECG signals to assess heart rate complexity and detect arrhythmias
  • Calculate signal regularity metrics from EMG data for motor control or fatigue analysis
  • Process multi-channel physiological data in batch by passing N-D arrays with axis parameter
  • Benchmark signal complexity changes over time or across experimental conditions using multiple entropy measures

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

AntroPy computes entropy and fractal dimension measures from time-series data, optimized for speed via Numba JIT compilation and designed to work on both 1-D and N-D arrays.

Yes. AntroPy is actively maintained, has no known vulnerabilities, uses a permissive BSD license, and installs with low friction. It provides a focused, well-documented toolkit for entropy and fractal dimension analysis with Numba-accelerated performance. Install if you need to extract complexity features from time-series data, especially physiological signals.

Install

antropy on PyPI

pip

pip install antropy

uv

uv add antropy

poetry

poetry add antropy

Installing antropy

Before you install

Low friction install with a pure-Python wheel. Requires Python 3.10+ and four standard scientific dependencies (numpy, scipy, scikit-learn, numba). Package is actively maintained with recent releases and no known vulnerabilities.

License in practice

BSD 3-clause is permissive; you can use, modify, and distribute AntroPy with minimal restrictions, provided you retain the license notice.

Quickstart

pip install antropy

import numpy as np
import antropy as ant

x = np.random.normal(size=3000)
print(ant.perm_entropy(x, normalize=True))
print(ant.spectral_entropy(x, sf=100, method='welch', normalize=True))
print(ant.hjorth_params(x, sf=100))

Requires Python 3.10 or later. Numba functions (sample_entropy, higuchi_fd, detrended_fluctuation) incur a one-time compilation cost on first call.

Verify before relying

  • Whether all entropy and fractal dimension functions support N-D arrays with axis parameter, or only a subset
  • Specific performance characteristics on hardware other than MacBook Pro M1 Max

Package facts

License BSD (3-clause) (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 4 — numpy, scipy, scikit-learn, numba
Maintenance actively maintained — 135 days since the last release
Last repo commit
First released
Downloads 195,866/month — #9,803 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: antropy-0.2.2-py3-none-any.whl

Intended Audience :: Science/ResearchOperating System :: MacOSOperating System :: POSIXOperating System :: UnixProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/Engineering :: Mathematics

Tags

entropy measures time seriesfractal dimension analysissignal feature extractionphysiological signal processingcomplexity analysis EEG ECGtime series regularityspectral entropy permutation entropy
signal-processingfeature-extractiontime-series

More Mathematics packages