diff --git a/checkpoint_restart.dat b/checkpoint_restart.dat new file mode 100644 index 000000000..99ed8d34d Binary files /dev/null and b/checkpoint_restart.dat differ diff --git a/xtrack/random/random_generators.py b/xtrack/random/random_generators.py index cc37cea20..8256c4e8d 100644 --- a/xtrack/random/random_generators.py +++ b/xtrack/random/random_generators.py @@ -48,7 +48,8 @@ def generate(self, n_samples=1000, n_seeds=1000, particles=None): context = self._context n_seeds = int(n_seeds) if particles is None: - particles = xp.Particles(state=np.ones(n_seeds), _context=context) + particles = xp.Particles(state=np.ones(n_seeds), + x=np.ones(n_seeds), _context=context) elif n_seeds != len(particles._rng_s1): print("Warning: both 'particles' and 'n_seeds' are given, but " + "are not compatible. Ignoring 'n_seeds'...")