提交 4262fc20 authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix crash, tests

上级 8a8bfaaa
...@@ -132,6 +132,16 @@ class Apply(Node): ...@@ -132,6 +132,16 @@ class Apply(Node):
return self.op.get_context(self) return self.op.get_context(self)
return NoContext return NoContext
def __getstate__(self):
d = self.__dict__
# ufunc don't pickle/unpickle well
if hasattr(self.tag, 'ufunc'):
d = copy(self.__dict__)
t = d["tag"]
del t.ufunc
d["tag"] = t
return d
def default_output(self): def default_output(self):
""" """
Returns the default output for this node. Returns the default output for this node.
......
...@@ -814,7 +814,6 @@ class Elemwise(OpenMPOp): ...@@ -814,7 +814,6 @@ class Elemwise(OpenMPOp):
return super(Elemwise, node_.op).make_thunk(node_, storage_map, return super(Elemwise, node_.op).make_thunk(node_, storage_map,
compute_map, no_recycling) compute_map, no_recycling)
def perform(self, node, inputs, output_storage): def perform(self, node, inputs, output_storage):
if len(node.inputs) >= 32: if len(node.inputs) >= 32:
# Some versions of NumPy will segfault, other will raise a # Some versions of NumPy will segfault, other will raise a
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论