提交 01266e11 authored 作者: amrithasuresh's avatar amrithasuresh

1. Updated numpy as np

2. Fixed indentation
上级 e13741a1
......@@ -2,17 +2,17 @@ from __future__ import absolute_import, print_function, division
import unittest
import theano
from theano import tensor, function, Variable, Generic
import numpy
import numpy as np
import os
class T_load_tensor(unittest.TestCase):
def setUp(self):
self.data = numpy.arange(5, dtype=numpy.int32)
self.data = np.arange(5, dtype=np.int32)
self.filename = os.path.join(
theano.config.compiledir,
"_test.npy")
numpy.save(self.filename, self.data)
np.save(self.filename, self.data)
def test0(self):
path = Variable(Generic())
......@@ -49,7 +49,7 @@ class T_load_tensor(unittest.TestCase):
path = Variable(Generic())
x = tensor.load(path, 'int32', (False,), mmap_mode='c')
fn = function([path], x)
assert type(fn(self.filename)) == numpy.core.memmap
assert type(fn(self.filename)) == np.core.memmap
def tearDown(self):
os.remove(os.path.join(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论