提交 fc03bdbd authored 作者: Chiheb Trabelsi's avatar Chiheb Trabelsi

test_rng_curand.py has been modified in order to respect the flake8 style.

上级 aa6c6a91
...@@ -8,7 +8,7 @@ from theano.sandbox.rng_mrg import MRG_RandomStreams ...@@ -8,7 +8,7 @@ from theano.sandbox.rng_mrg import MRG_RandomStreams
# Skip tests if cuda_ndarray is not available. # Skip tests if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest from nose.plugins.skip import SkipTest
import theano.sandbox.cuda as cuda_ndarray import theano.sandbox.cuda as cuda_ndarray
if cuda_ndarray.cuda_available == False: if cuda_ndarray.cuda_available is False:
raise SkipTest('Optional package cuda disabled') raise SkipTest('Optional package cuda disabled')
# The PyCObject that represents the cuda random stream object # The PyCObject that represents the cuda random stream object
...@@ -168,13 +168,13 @@ def compare_speed(): ...@@ -168,13 +168,13 @@ def compare_speed():
dest = theano.shared(numpy.zeros(N, dtype=theano.config.floatX)) dest = theano.shared(numpy.zeros(N, dtype=theano.config.floatX))
mrg_u = theano.function([], [], updates={dest: mrg.uniform((N,))}, mrg_u = theano.function([], [], updates={dest: mrg.uniform((N,))},
profile='mrg uniform') profile='mrg uniform')
crn_u = theano.function([], [], updates={dest: crn.uniform((N,))}, crn_u = theano.function([], [], updates={dest: crn.uniform((N,))},
profile='crn uniform') profile='crn uniform')
mrg_n = theano.function([], [], updates={dest: mrg.normal((N,))}, mrg_n = theano.function([], [], updates={dest: mrg.normal((N,))},
profile='mrg normal') profile='mrg normal')
crn_n = theano.function([], [], updates={dest: crn.normal((N,))}, crn_n = theano.function([], [], updates={dest: crn.normal((N,))},
profile='crn normal') profile='crn normal')
for f in mrg_u, crn_u, mrg_n, crn_n: for f in mrg_u, crn_u, mrg_n, crn_n:
# don't time the first call, it has some startup cost # don't time the first call, it has some startup cost
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论