提交 af7f0cd8 authored 作者: james@crane's avatar james@crane

added test: borrow=False for an output that is also an input

上级 24201370
...@@ -275,6 +275,12 @@ class T_function(unittest.TestCase): ...@@ -275,6 +275,12 @@ class T_function(unittest.TestCase):
self.failUnless(dec[s] == -1) self.failUnless(dec[s] == -1)
def test_borrow_output(self):
a = T.dmatrix()
f = function([a], Out(a, borrow=False))
o = N.ones((3,3))
assert o is not f(o)
class T_picklefunction(unittest.TestCase): class T_picklefunction(unittest.TestCase):
def test_deepcopy(self): def test_deepcopy(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论