python: adapt test to NumPy 2.x

This commit is contained in:
Maksim Shabunin 2024-05-03 20:10:41 +03:00
parent 6e5a53c37a
commit af4531b378

View File

@ -451,7 +451,7 @@ class Arguments(NewOpenCVTests):
try_to_convert = partial(self._try_to_convert, cv.utils.dumpFloat) try_to_convert = partial(self._try_to_convert, cv.utils.dumpFloat)
min_float, max_float = get_limits(ctypes.c_float) 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), 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'), max_float, np.inf, -np.inf, float('Inf'), -float('Inf'),
np.double(np.inf), np.double(-np.inf), np.double(float('Inf')), np.double(np.inf), np.double(-np.inf), np.double(float('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_float, max_float = get_limits(ctypes.c_float)
min_double, max_double = get_limits(ctypes.c_double) 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), 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'), max_float, min_double, max_double, np.inf, -np.inf, float('Inf'),
-float('Inf'), np.double(np.inf), np.double(-np.inf), -float('Inf'), np.double(np.inf), np.double(-np.inf),
np.double(float('Inf')), np.double(-float('Inf'))): np.double(float('Inf')), np.double(-float('Inf'))):