Make center_of_mass a scalar observable in random walk example