def test_nvcc_cast():
 var = theano.tensor.fvector()
 f = theano.function([var], ((-1.0) * (var > 0)), mode=mode_with_gpu)
 if (not numpy.allclose(f([(-1), 0, 1]), [0, 0, (-1)])):
  raise Exception('The version of nvcc that Theano detected on your system has a bug during conversion from integers to floating point. Installing CUDA 7.0 (or more recent) should fix the problem.')

def test_nvcc_cast ( ) : var = theano . tensor . fvector ( ) f = theano . function ( [ var ] , ( ( - 1.0 ) * ( var > 0 ) ) , mode = mode_with_gpu ) if ( not numpy . allclose ( f ( [ ( - 1 ) , 0 , 1 ] ) , [ 0 , 0 , ( - 1 ) ] ) ) : raise Exception ( 'The version of nvcc that Theano detected on your system has a bug during conversion from integers to floating point. Installing CUDA 7.0 (or more recent) should fix the problem.' )
test that the casting behaviour is correct .