File: 0011-Fix-FTBFS-with-NumPy-2.3.patch

package info (click to toggle)
pytango 10.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,216 kB
  • sloc: python: 28,206; cpp: 16,380; sql: 255; sh: 82; makefile: 43
file content (31 lines) | stat: -rw-r--r-- 1,456 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
22
23
24
25
26
27
28
29
30
31
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Thu, 2 Oct 2025 16:59:20 +0200
Subject: Fix FTBFS with NumPy 2.3

Bug-Debian: https://bugs.debian.org/1114714
---
 ext/fast_from_py_numpy.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ext/fast_from_py_numpy.hpp b/ext/fast_from_py_numpy.hpp
index f2baf90..784e59d 100644
--- a/ext/fast_from_py_numpy.hpp
+++ b/ext/fast_from_py_numpy.hpp
@@ -38,7 +38,7 @@ template <long tangoScalarTypeConst>
 
     // Is the array exactly what we need? I mean: The type we need and with
     // continuous aligned memory?
-    const bool exact_array = (PyArray_CHKFLAGS(to_PyArrayObject(py_val), NPY_C_CONTIGUOUS | NPY_ALIGNED) &&
+    const bool exact_array = (PyArray_CHKFLAGS(to_PyArrayObject(py_val), NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_ALIGNED) &&
                               (PyArray_TYPE(to_PyArrayObject(py_val)) == typenum));
 
     if(isImage)
@@ -201,7 +201,7 @@ template <long tangoArrayTypeConst>
 
     // Is the array exactly what we need? I mean: The type we need and with
     // continuous aligned memory?
-    const bool exact_array = (PyArray_CHKFLAGS(to_PyArrayObject(py_val), NPY_C_CONTIGUOUS | NPY_ALIGNED) &&
+    const bool exact_array = (PyArray_CHKFLAGS(to_PyArrayObject(py_val), NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_ALIGNED) &&
                               (PyArray_TYPE(to_PyArrayObject(py_val)) == typenum));
 
     // Check: This is an spectrum!