Package: release.debian.org Severity: normal User: [email protected] Usertags: unblock X-Debbugs-Cc: [email protected] Control: affects -1 + src:dioptas
Please unblock package dioptas (Please provide enough (but not too much) information to help the release team to judge the request efficiently. E.g. by filling in the sections below.) [ Reason ] One-line fix for an important bug. [ Impact ] The calibration feature was broken due to changes in Numpy; this version includes a one-line fix to fix compatibility with current Numpy. [ Tests ] None, unfortunately. [ Risks ] Low. Leaf package, obvious and very constrained fix. [ Checklist ] [x] all changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in testing Here's the full diff for the upload: diff --git a/debian/changelog b/debian/changelog index fbc51daed2dc352c49b8d9291a011af730abb2ed..6c2fc6a1f705c555210b98493c69556d7c84bdc5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +dioptas (0.6.1-2) unstable; urgency=medium + + * Bug fix: "Calibration fails with deprecated "np.NaN" + command", thanks to Carlo Segre (Closes: #1108325). + + -- Roland Mas <[email protected]> Tue, 01 Jul 2025 12:32:08 +0200 + dioptas (0.6.1-1) unstable; urgency=medium * New upstream release. diff --git a/debian/patches/0004-Fix-Numpy-compatibility.patch b/debian/patches/0004-Fix-Numpy-compatibility.patch new file mode 100644 index 0000000000000000000000000000000000000000..c6dbc9467ac07bf14327854d2628bfc92af203b2 --- /dev/null +++ b/debian/patches/0004-Fix-Numpy-compatibility.patch @@ -0,0 +1,21 @@ +From: Roland Mas <[email protected]> +Date: Tue, 1 Jul 2025 12:31:06 +0200 +Subject: Fix Numpy compatibility + +--- + dioptas/model/CalibrationModel.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dioptas/model/CalibrationModel.py b/dioptas/model/CalibrationModel.py +index f5d68eb..a590c2a 100755 +--- a/dioptas/model/CalibrationModel.py ++++ b/dioptas/model/CalibrationModel.py +@@ -271,7 +271,7 @@ class CalibrationModel(object): + sub_data = np.array( + self.img_model.img_data.ravel()[np.where(mask.ravel())], dtype=np.float64 + ) +- sub_data[np.where(sub_data > upper_limit)] = np.NaN ++ sub_data[np.where(sub_data > upper_limit)] = np.nan + mean = np.nanmean(sub_data) + std = np.nanstd(sub_data) + diff --git a/debian/patches/series b/debian/patches/series index ae19d2878c912a5b7e668b577ded883f4938f2d2..08fc434657e8b7f8c308b9f48a80733477319674 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 0001-Use-local-copy-of-MathJax.patch 0002-Allow-running-testsuite-from-a-separate-directory.patch 0003-Fix-method-invocation.patch +0004-Fix-Numpy-compatibility.patch [ Other info ] I don't want to inflate the severity of the bug, so it's technically "important" only; I still think it would be a good idea to unblock this package, given the impact and the trivial fix (replace "np.NaN" with "np.nan"). unblock dioptas/0.6.1-2

