File: 0004-Fix-Numpy-compatibility.patch

package info (click to toggle)
dioptas 0.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 163,396 kB
  • sloc: python: 28,770; makefile: 24; xml: 9; sh: 3
file content (21 lines) | stat: -rw-r--r-- 772 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Roland Mas <lolando@debian.org>
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)