← All posts

Release of healpy 1.20.0

I am pleased to announce the release of healpy 1.20.0.

This release includes several important updates, including dropping support for NumPy 1.x, performance optimizations, and the introduction of new harmonic downgrading features.

You can install the new version from PyPI:

pip install healpy==1.20.0

Or from conda-forge:

conda install -c conda-forge healpy

Breaking Changes

  • NumPy 2.0: Bumped the minimum NumPy version to 2.0.0 and compiled extensions against the NumPy 2.0 ABI. The last stable release supporting NumPy 1.x is 1.19.0.

Summary of Changes

Here is a summary of the key changes in this release:

  • Performance: Optimized almxfl for better cache locality by swapping the loop order, resulting in a ~2-3x speedup for large datasets.
  • New Features:
    • Added harmonic_ud_grade to change map NSIDE via spherical-harmonic transforms, providing an artifact-resistant alternative to pixel-space ud_grade for diffuse signals. The new API supports pixel-window and beam transfer corrections, direct aℓma_{\ell m} input, and API cross-links from ud_grade.
    • Added return_ranges parameter to query_disc, query_polygon, and query_strip functions to return pixel ranges instead of individual pixel indices, reducing memory usage from O(N) to O(√N) for large queries.
  • Bug Fixes:
    • Fixed an off-by-one error in synalm Cℓ boundary check that caused out-of-bounds reads.
    • Fixed scalar boolean array indexing in projection functions (mollview, gnomview, azeqview) that caused corrupted masked output and assertion errors with NumPy 2.2.x and Python 3.14.
    • Fixed test_rotate_alm2: the a_lm initialization now includes the m == ell diagonal, matching the Fortran reference.
    • Fixed mollview/projview handling of matplotlib colormap objects so badcolor and bgcolor are applied consistently, and ensure projview masks UNSEEN pixels correctly.
  • Documentation and CI:
    • Comprehensive documentation fixes including consistent HEALPix/healpy capitalization, corrected default values, missing parameter docs, broken RST formatting, dead Google Code URLs replaced with GitHub, typos, and grammar.
    • CI improvements including a new test workflow running the full test suite on Python 3.10–3.13 with ccache, an astropy pre-release job, and building Linux wheels with manylinux_2_28 for x86_64/aarch64 to avoid SciPy source builds failing on missing OpenBLAS.
    • Fixed uv pip install -e . editable builds by recomputing pkg-config environment paths in setup.py, and added CI coverage for the uv editable install path.

For a full list of changes, please refer to the CHANGELOG.