Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Avoid divide by zero warnings when normalizing DWI data
Avoid divide by zero warnings when normalizing the DWI data: perform the division only in foreground voxels. Fixes: ``` nireports/tests/test_dwi.py::test_nii_to_carpetplot_data /home/runner/work/nireports/nireports/nireports/reportlets/modality/dwi.py:491: RuntimeWarning: invalid value encountered in divide nii_data = nii_data / bzero[..., np.newaxis] ``` Raised for example in: https://github.com/nipreps/nireports/actions/runs/12681153218/job/35344304375#step:12:339
- Loading branch information