• notoraptor's avatar
    Update to fix python 3 error · 27f49908
    notoraptor 提交于
    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
    ```
    27f49908
名称
最后提交
最后更新
.jenkins 正在载入提交数据...
benchmark 正在载入提交数据...
bin 正在载入提交数据...
doc 正在载入提交数据...
theano 正在载入提交数据...
.gitignore 正在载入提交数据...
.mailmap 正在载入提交数据...
.travis.yml 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
DESCRIPTION.txt 正在载入提交数据...
EMAIL.txt 正在载入提交数据...
HISTORY.txt 正在载入提交数据...
ISSUE_TEMPLATE.md 正在载入提交数据...
LICENSE.txt 正在载入提交数据...
MANIFEST.in 正在载入提交数据...
NEWS.txt 正在载入提交数据...
NEWS_DEV.txt 正在载入提交数据...
README.txt 正在载入提交数据...
Theano.pyproj 正在载入提交数据...
Theano.sln 正在载入提交数据...
requirement-rtd.txt 正在载入提交数据...
setup.cfg 正在载入提交数据...
setup.py 正在载入提交数据...