C++ expression compilation problem

Hi!
I’m trying to generate white noise by generated a random number for each coordinate (x,y) of my 2D mesh.
To do so, I write:
f = Expression((tpl1,tpl2,tpl3,tpl4,tpl5,tpl6,tpl7,tpl8), degree=0)
with for each i=1,…,8
tpl = tuple([str(elt) for elt in lst])
and
lst = np.random.normal(0,10,8)
But when I do so, there’s a problem for the C++ compilation of the expression…

How would you do have f as a white noise generator?

An expression should be a scalar expression, evaluated at each coordinate.
Consider the following:

from dolfin import *
import numpy as np
mesh = UnitSquareMesh(8,8)
V = FunctionSpace(mesh, "CG", 1)

class white_noise(UserExpression):
    def __init__(self, **kwargs):
        super().__init__(kwargs)
    def eval(self, values, x):
        values[0] = np.random.normal(0,10)

    def value_shape(self):
        return ()

u = project(white_noise(), V)
XDMFFile("whitenoise.xdmf").write_checkpoint(u, "noise", 0.0)

Thank you very much!