From af4531b3789d959b802c39b1753beb0f32dd63fc Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Fri, 3 May 2024 20:10:41 +0300 Subject: [PATCH] python: adapt test to NumPy 2.x --- modules/python/test/test_misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/test/test_misc.py b/modules/python/test/test_misc.py index bcd3152699..08ab04d53d 100644 --- a/modules/python/test/test_misc.py +++ b/modules/python/test/test_misc.py @@ -451,7 +451,7 @@ class Arguments(NewOpenCVTests): try_to_convert = partial(self._try_to_convert, cv.utils.dumpFloat) min_float, max_float = get_limits(ctypes.c_float) for convertible in (2, -13, 1.24, np.float32(32.45), float(32), np.double(12.23), - np.float32(-12.3), np.float64(3.22), np.float_(-1.5), min_float, + np.float32(-12.3), np.float64(3.22), min_float, max_float, np.inf, -np.inf, float('Inf'), -float('Inf'), np.double(np.inf), np.double(-np.inf), np.double(float('Inf')), np.double(-float('Inf'))): @@ -495,7 +495,7 @@ class Arguments(NewOpenCVTests): min_float, max_float = get_limits(ctypes.c_float) min_double, max_double = get_limits(ctypes.c_double) for convertible in (2, -13, 1.24, np.float32(32.45), float(2), np.double(12.23), - np.float32(-12.3), np.float64(3.22), np.float_(-1.5), min_float, + np.float32(-12.3), np.float64(3.22), min_float, max_float, min_double, max_double, np.inf, -np.inf, float('Inf'), -float('Inf'), np.double(np.inf), np.double(-np.inf), np.double(float('Inf')), np.double(-float('Inf'))):