#NEWLINE# def test_cublasScrnm2( self ) : #NEWLINE# #INDENT# x = ( np . random . rand ( 5 ) + ( 1j * np . random . rand ( 5 ) ) ) . astype ( np . complex64 ) #NEWLINE# x_gpu = gpuarray . to_gpu ( x ) #NEWLINE# result = cublas . cublasScnrm2 ( self . cublas_handle , result . size , x_gpu . gpudata , 1 ) #NEWLINE# assert np . allclose ( result , np . linalg . norm ( x ) )