• 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
名称
最后提交
最后更新
..
compat 正在载入提交数据...
compile 正在载入提交数据...
d3viz 正在载入提交数据...
gof 正在载入提交数据...
gpuarray 正在载入提交数据...
misc 正在载入提交数据...
sandbox 正在载入提交数据...
scalar 正在载入提交数据...
scan_module 正在载入提交数据...
sparse 正在载入提交数据...
tensor 正在载入提交数据...
tests 正在载入提交数据...
typed_list 正在载入提交数据...
__init__.py 正在载入提交数据...
configdefaults.py 正在载入提交数据...
configparser.py 正在载入提交数据...
gradient.py 正在载入提交数据...
ifelse.py 正在载入提交数据...
printing.py 正在载入提交数据...
raise_op.py 正在载入提交数据...
updates.py 正在载入提交数据...
version.py 正在载入提交数据...