5.3.0
Release notes
This release primarily adds support for Python 3.13 and Numpy 2.0.
NiBabel 6.0 will drop support for Numpy 1.x.
New features
- Update NIfTI extension protocol to include
.content : bytes
,.text : str
and.json : dict
properties for accessing extension contents. Exceptions will be raised on.text
and.json
if conversion fails. (#1336) (CM)
Enhancements
- Ability to read data from many multiframe DICOM files that previously generated errors (#1340) (Brendan Moloney, reviewed by CM)
nib-nifti-dx
now supports NIfTI-2 files with a--nifti2
flag (#1323) (CM)- Update nibabel.streamlines.tractogram to support ragged arrays. (#1291) (Serge Koudoro, reviewed by CM)
- Filter numpy
UserWarning
onnp.finfo(np.longdouble)
. This can occur on Windows systems, but it's done in the context of checking for the problem that is being warned against, so there's no need to be noisy. (#1310) (Joshua Newton, reviewed by CM) - Improve error message for for dicomwrapper errors in shape calculation (#1302) (YOH, reviewed by CM)
- Support "flat" ASCII-encoded GIFTI DataArrays (#1298) (PM, reviewed by CM)
Bug fixes
- Fix location initialization/update in OrthoSlicer3D for permuted axes (#1319, #1350) (Guillaume Becq, reviewed by CM)
- Fix DICOM scaling, making frame filtering explicit (#1342) (Brendan Moloney, reviewed by CM)
- Fixed multiframe DICOM issue where data could be flipped along slice dimension relative to the affine (#1340) (Brendan Moloney, reviewed by CM)
- Fixed multiframe DICOM issue where
image_position
and the translation component in theaffine
could be incorrect (#1340) (Brendan Moloney, reviewed by CM)
Maintenance
- Numpy 2.0 compatibility and addressing deprecations in numpy API (#1304, #1330, #1331, #1334, #1337) (Jon Haitz Legarreta Gorroño, CM)
- Python 3.13 compatibility (#1315) (Sandro from the Fedora Project, reviewed by CM)
- Testing on Python 3.13 with free-threading (#1339) (CM)
- Testing on ARM64 Mac OS runners (#1320) (CM)
- Proactively address deprecations in coming Python versions (#1329, #1332, #1333) (Jon Haitz Legarreta Gorroño, reviewed by CM)
- Replace nose-era
setup()
andteardown()
functions with pytest equivalents (#1325) (Sandro from the Fedora Project, reviewed by Étienne Mollier and CM) - Transitioned from blue/isort/flake8 to ruff. (#1289) (Dimitri Papadopoulos, reviewed by CM)
- Vetted and added various rules to the ruff configuration for auto-formatting and style guide enforcement. (#1321, #1351, #1352, #1353, #1354, #1355, #1357, #1358, #1359, #1360, #1361, #1362, #1363, #1364, #1368, #1369) (Dimitri Papadopoulos, reviewed by CM)
- Fixing typos when found. (#1313, #1370) (MB, Dimitri Papadopoulos)
- Applied Repo-Review suggestions (Dimitri Papadopoulos, reviewed by CM)
API changes and deprecations
- Raise HeaderDataError from set_qform if the affine fails to decompose. This would previously result in numpy.linalgLinAlgError. (#1227) (CM)
- The nibabel.onetime.auto_attr module can be replaced by functoolscached_property in all supported versions of Python. This alias may be removed in future versions. (#1341) (CM)
- Removed the deprecated
nisext
(setuptools extensions) package. (#1290) (CM, reviewed by MB)
New Contributors
- @joshuacwnewton made their first contribution in #1310
- @gjpcbecq made their first contribution in #1319
Full Changelog: 5.2.1...5.3.0