提交 73cf3066 authored 作者: Pascal Lamblin's avatar Pascal Lamblin 提交者: GitHub

Merge pull request #6138 from abergeron/fix_pickle

Repack the pickle with protocol 2 and open in binary mode.
...@@ -110,7 +110,7 @@ def test_unpickle_gpuarray_as_numpy_ndarray_flag0(): ...@@ -110,7 +110,7 @@ def test_unpickle_gpuarray_as_numpy_ndarray_flag0():
testfile_dir = os.path.dirname(os.path.realpath(__file__)) testfile_dir = os.path.dirname(os.path.realpath(__file__))
fname = 'GpuArray.pkl' fname = 'GpuArray.pkl'
with open(os.path.join(testfile_dir, fname), 'r') as fp: with open(os.path.join(testfile_dir, fname), 'rb') as fp:
if PY3: if PY3:
u = CompatUnpickler(fp, encoding="latin1") u = CompatUnpickler(fp, encoding="latin1")
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论