Update to fix python 3 error
Update test function test_pycuda_memory_to_theano() to fix Python 3 error.
The refcount of a variable seems to be different between Python 2 and Python 3. So it seems better to stock an initial refcount in a variable and then do the checkings with that variable instead of directly using comparing to constant values.
Tests passed with Python 3 (Anaconda):
```
$ nosetests --verbose --nocapture theano/misc/tests/test_pycuda_theano_simple.py
Run pycuda only example to test that pycuda works. ... ok
Simple example with pycuda function and Theano CudaNdarray object. ... ok
theano.misc.tests.test_pycuda_theano_simple.test_pycuda_memory_to_theano ... 4
gpuarray ref count before creating a CudaNdarray 4
strides (20, 5, 1)
gpuarray ref count after creating a CudaNdarray 5
gpuarray ref count after deleting the CudaNdarray 4
ok
----------------------------------------------------------------------
Ran 3 tests in 0.297s
OK
```
正在显示
请
注册
或者
登录
后发表评论