提交 cfd7f2ce authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Apparently DebugMode also need to know about _cdata_type.

上级 a3e5e023
...@@ -1024,10 +1024,10 @@ def _lessbroken_deepcopy(a): ...@@ -1024,10 +1024,10 @@ def _lessbroken_deepcopy(a):
""" """
# this exists because copy.deepcopy on numpy arrays is broken # this exists because copy.deepcopy on numpy arrays is broken
# This logic is also in link.py # This logic is also in link.py
from theano.gof.type import CDataType from theano.gof.type import _cdata_type
if type(a) in (numpy.ndarray, numpy.memmap): if type(a) in (numpy.ndarray, numpy.memmap):
rval = a.copy() rval = a.copy()
elif type(a) is CDataType._cdata_type: elif type(a) is _cdata_type:
# This is not copyable (and should be used for constant data). # This is not copyable (and should be used for constant data).
rval = a rval = a
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论