mirror of
https://github.com/opencv/opencv.git
synced 2025-07-20 19:17:36 +08:00
replace deprecated np.fromstring() by np.frombuffer()
This commit is contained in:
parent
6092499907
commit
a47f0f00cb
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user