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
almxflfor better cache locality by swapping the loop order, resulting in a ~2-3x speedup for large datasets. - New Features:
- Added
harmonic_ud_gradeto change map NSIDE via spherical-harmonic transforms, providing an artifact-resistant alternative to pixel-spaceud_gradefor diffuse signals. The new API supports pixel-window and beam transfer corrections, direct input, and API cross-links fromud_grade. - Added
return_rangesparameter toquery_disc,query_polygon, andquery_stripfunctions to return pixel ranges instead of individual pixel indices, reducing memory usage from O(N) to O(√N) for large queries.
- Added
- Bug Fixes:
- Fixed an off-by-one error in
synalmCℓ 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: thea_lminitialization now includes them == elldiagonal, matching the Fortran reference. - Fixed
mollview/projviewhandling of matplotlib colormap objects sobadcolorandbgcolorare applied consistently, and ensureprojviewmasksUNSEENpixels correctly.
- Fixed an off-by-one error in
- 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 insetup.py, and added CI coverage for the uv editable install path.
For a full list of changes, please refer to the CHANGELOG.