Skip to content

Releases: raphaelvallat/antropy

Antropy v0.2.2

01 Apr 21:31
dfbe688

Choose a tag to compare

Summary — v0.2.2 (April 2026)

Permutation entropy

Support for 2D arrays

  • perm_entropy now accepts 2-D arrays of shape (n_channels, n_times) for order ∈ {3, 4}, computing entropy for every row in a single vectorised call.

Speed-up:

  • perm_entropy fast path (only for order 3 or 4): ordinal patterns are now encoded via pairwise comparison bit-keys and counted with np.bincount rather than argsort + np.unique, giving a major speed-up
  • perm_entropy general path (order > 4): the embedded matrix is now built as a zero-copy as_strided view and the hash is computed via a single @ product instead of an element-wise multiply + sum (faster).

Bugfixes

  • perm_entropy now applies a small positional epsilon jitter before sorting, making results fully deterministic across platforms and dtypes. Previously, integer-typed signals (and float signals with exact ties) could give different outputs depending on the platform's unstable-sort tie-breaking behaviour.
  • Normalized perm_entropy output is clipped to [0, 1] to prevent returning -0.0 for perfectly regular signals.

Docs

  • Fixed doctest failures in spectral_entropy, num_zerocross, and hjorth_params caused by NumPy's new scalar repr (np.float64(x) / np.int64(x) instead of bare literals).
  • Added a Big O complexity column to the performance tables, with footnotes for perm_entropy, svd_entropy, higuchi_fd, spectral_entropy, and app_entropy / sample_entropy.
  • Performance tables now show timings at both 1 000 and 10 000 samples.
  • Added perm_entropy docstring warning about tie-breaking and the jitter strategy.
  • Added benchmarks/benchmark_all.py script to reproduce all table timings.
  • Rewrote docs/index.rst to match README.rst in content and style.

Maintenance

  • Clean up docs/conf.py (remove redundant sys.path manipulation) and tighten pyproject.toml (remove stale extras, fix editable-install metadata).

What's Changed

Full Changelog: v0.2.1...v0.2.2

Antropy v0.2.1

06 Mar 16:19
f28cbfc

Choose a tag to compare

See full changelog at https://raphaelvallat.com/antropy/changelog.html

What's Changed

Full Changelog: v0.2.0...v0.2.1

AntroPy v0.2.0

06 Mar 14:33
ab8c158

Choose a tag to compare

v0.2.0 (March 2026)

Build & CI

  • Drop Python 3.9 (EOL), add Python 3.13 support. Minimum is now Python 3.10.
  • Switch from pip to uv in all GitHub Actions workflows.
  • Add explicit minimum versions for core dependencies: numpy>=1.22.4, scipy>=1.8.0, scikit-learn>=1.2.0.
  • Migrate [project.optional-dependencies] to PEP 735 [dependency-groups].
  • Bump setuptools>=80.0.
  • Split CI into three jobs: test-core (3 platforms × 4 Python versions), test-dependency-combinations (4 dep combos from minimum to latest), and coverage.
  • Fix test-dependency-combinations job: separate antropy install (--no-deps) from test-dependency install so that pytest’s own dependencies (e.g. pluggy) are always resolved.
  • Fix Codecov upload to use ${{ secrets.CODECOV_TOKEN }} instead of a hardcoded token.
  • Switch Ruff workflow from astral-sh/ruff-action@v1 to uvx ruff via astral-sh/setup-uv@v7.
  • Extend Ruff rules: add W (pycodestyle warnings) and NPY (NumPy rules).

Tests

  • Increase test coverage from ~54 % to 100 %.
  • Add tests/test_utils.py covering all branches of the _embed helper (1-D and 2-D paths, all error conditions).
  • Add edge-case tests: sample_entropy returning inf (m-length matches exist but no (m+1)-length matches); detrended_fluctuation returning NaN for a constant signal; spectral_entropy raising on an invalid method string.
  • Set NUMBA_DISABLE_JIT=1 in the coverage CI job so coverage.py can instrument Numba JIT function bodies; other CI jobs still exercise real compiled code.

Bug fixes

  • Fix antropy.higuchi_fd() returning a ValueError (math domain error) on constant or integer-typed input arrays: log(0) is now guarded to return -inf, matching Numba’s IEEE 754 behaviour.

Docs

  • Switch documentation theme from sphinx_bootstrap_theme to pydata-sphinx-theme (dark/light toggle, GitHub icon, improved layout).
  • Fix three broken intersphinx URLs: NumPy, SciPy, and MNE-Python.
  • Add sphinx.ext.mathjax for LaTeX math rendering in docstrings.
  • Add contributing.rst guide.
  • Fix stale :py:func: cross-references in changelog entries v0.1.1–v0.1.3 (entropy.XXX → antropy.XXX).
  • Fix typo in v0.1.6 changelog (“Fox for KDTree” → “Fix for KDTree”).
  • Modernize README.rst and docs/index.rst: add PyPI, conda-forge, downloads, and Ruff badges; add uv installation instructions; fix broken links.

v0.1.9

04 Feb 19:23
b774718

Choose a tag to compare

What's Changed

  • MAINT: Remove stochastic hard dependency by @larsoner in #41

New Contributors

Full Changelog: v0.1.8...v0.1.9

v0.1.8

21 Dec 12:58
98970eb

Choose a tag to compare

What's Changed

Full Changelog: v0.1.7...v0.1.8

v0.1.7

20 Dec 14:06
1e2c48a

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.6...v0.1.7

v0.1.6

29 Jul 05:06

Choose a tag to compare

This release requires numba >= 0.57.

What's Changed

  • Allow readonly arrays in numba jit signature by @jvdd in #23
  • Improved sample entropy kernel by @FirefoxMetzger in #25
  • fix: KDTree.valid_metrics is method since sklearn 1.3 by @jvdd in #30
  • Replaced Python 3.7 with 3.10 in Github Actions
  • Fix pandas deprecation in notebooks

New Contributors

Full Changelog: v0.1.5...v0.1.6

v0.1.5

17 Dec 18:33

Choose a tag to compare

This is a minor release.

What's Changed

  • Handle the limit of p = 0 in p log2 p by @jftsang in #3
  • Correlation between entropy/FD metrics for data traces from Hodgin-Huxley model by @antelk in #5
  • Fix docstrings and rerun by @antelk in #7
  • Improve performance in _xlog2x by @jftsang in #8
  • Prevent invalid operations in xlogx by @guiweber in #11
  • Allow readonly arrays for higuchi_fd by @jvdd in #13
  • modify the _embed function to fit the 2d input by @cheliu-computation in #15
  • Fixed division by zero in linear regresion function (with test) by @Arritmic in #21
  • Add conda install instructions by @raphaelvallat in #19

New Contributors

Full Changelog: v0.1.4...v0.1.5

v0.1.4

01 Apr 22:28

Choose a tag to compare

This new release includes a faster implementation of the LZ complexity algorithm (see #1).