Merge pull request #26949 from shyama7004:Fix

replace deprecated np.fromstring() by np.frombuffer()
This commit is contained in:
Alexander Smorkalov 2025-02-21 13:55:23 +03:00 committed by GitHub
commit a256886838
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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):