def test_scalar(self): x = cuda.fscalar() y = numpy.array(7, dtype='float32') assert y.size == theano.function([x], x.size)(y)