def test0(self):
path = Variable(Generic())
# Not specifying mmap_mode defaults to None, and the data is
# copied into main memory
x = tensor.load(path, 'int32', (False,))
y = x * 2
fn = function([path], y)
assert (fn(self.filename) == (self.data * 2)).all()
评论列表
文章目录