From a47f0f00cb68c6afd3a24a880cc4dc4517ae5c7d Mon Sep 17 00:00:00 2001 From: shyama7004 Date: Fri, 21 Feb 2025 10:37:11 +0530 Subject: [PATCH] replace deprecated np.fromstring() by np.frombuffer() --- modules/python/test/tests_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/test/tests_common.py b/modules/python/test/tests_common.py index d6931829d3..cda448891b 100644 --- a/modules/python/test/tests_common.py +++ b/modules/python/test/tests_common.py @@ -49,7 +49,7 @@ class NewOpenCVTests(unittest.TestCase): filepath = self.find_file(filename) with open(filepath, 'rb') as f: filedata = f.read() - self.image_cache[filename] = cv.imdecode(np.fromstring(filedata, dtype=np.uint8), iscolor) + self.image_cache[filename] = cv.imdecode(np.frombuffer(filedata, dtype=np.uint8), iscolor) return self.image_cache[filename] def setUp(self):