piiswrong closed pull request #9445: np.fromstring: DeprecationWarning URL: https://github.com/apache/incubator-mxnet/pull/9445
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/python/mxnet/recordio.py b/python/mxnet/recordio.py index 39f442b6ae..7adb0b513e 100644 --- a/python/mxnet/recordio.py +++ b/python/mxnet/recordio.py @@ -409,7 +409,7 @@ def unpack_img(s, iscolor=-1): [166, 167, 165]]], dtype=uint8) """ header, s = unpack(s) - img = np.fromstring(s, dtype=np.uint8) + img = np.frombuffer(s, dtype=np.uint8) assert cv2 is not None img = cv2.imdecode(img, iscolor) return header, img ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services