Converting n_macroparticles to int to eliminate the DeprecationWarning