def separate_particles(samples, index=None):
    """Get particle coordinates from array (just reshape the array)

    Args:
        samples (array_like): [N_samples, 2xN_particles]
        index (int, optional): Where to split, (usually at the half of the array). Defaults to None.

    Returns:
        px (array_like): [N_samples, N_particles] first coordinate of the particles
        py (array_like): [N_samples, N_particles] second coordinate of the particles
    """

    if index is None:
        index = int(len(samples.shape[1])/2)
    px = samples[:, :index]
    py = samples[:, index:]
    return px, py