提交 9c60aa57 authored 作者: Benjamin Scellier's avatar Benjamin Scellier 提交者: Nicolas Ballas

file theano/gof/utils.py

上级 4d1293e4
......@@ -3,7 +3,7 @@ import linecache
import sys
import traceback
import numpy
import numpy as np
from six import iteritems, integer_types, string_types, with_metaclass
from six.moves import StringIO
......@@ -561,8 +561,8 @@ else:
try:
return hashlib.md5(msg).hexdigest()
except TypeError:
assert isinstance(msg, numpy.ndarray)
return hashlib.md5(numpy.getbuffer(msg)).hexdigest()
assert isinstance(msg, np.ndarray)
return hashlib.md5(np.getbuffer(msg)).hexdigest()
def hash_from_file(file_path):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论