Explorar o código

v3.0: from_buffer

Tinger %!s(int64=2) %!d(string=hai) anos
pai
achega
b0a65f9770
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      utils/util.py

+ 1 - 1
utils/util.py

@@ -65,7 +65,7 @@ def str_include(str_long: "str", str_short: "str") -> "bool":
 
 
 def read_img(content: "str") -> "np.ndarray":
-    return cv2.imdecode(np.fromstring(content, np.uint8), 1)  # noqa
+    return cv2.imdecode(np.frombuffer(content, np.uint8), 1)  # noqa
 
 
 def rot_img(img: "np.ndarray") -> "list[np.ndarray]":