My x was a vector function similar to u.
Here it seems that mpx is already an array and I’m not sure how this array is organized can you print the begining of it.
If it has the same organization as my x then just remove the .vector()
Otherwise:
V2=VectorFunctionSpace(mesh,'P',1)
X=Expression(('x[0]','x[1]','x[2]'),element = V2.ufl_element())
x=interpolate(X,V2)
x_arr=np.reshape(np.array(x.vector()),m//3,3)