Skip to content
Snippets Groups Projects
Commit 645cc145 authored by Juncheng's avatar Juncheng Committed by scxfjiang
Browse files

fix path to numpy (#2130)

parent 01482ab8
No related branches found
Tags v3.19-rc1
No related merge requests found
......@@ -40,7 +40,7 @@ def _MakeModelInitJobFunc():
def _MakeModelLoadJobFunc(path):
def push_cb(blob):
blob.CopyFromNdarray(np.asarray(list(map(int, path.encode('ascii'))), dtype=np.int8))
blob.CopyFromNdarray(np.frombuffer(path.encode('ascii'), dtype=np.int8))
def finish_cb():
pass
......@@ -52,7 +52,7 @@ def _MakeModelLoadJobFunc(path):
def _MakeModelSaveJobFunc(path):
def push_cb(blob):
blob.CopyFromNdarray(np.asarray(list(map(int, path.encode('ascii'))), dtype=np.int8))
blob.CopyFromNdarray(np.frombuffer(path.encode('ascii'), dtype=np.int8))
def finish_cb():
pass
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment