def __init__(self, n_mps=None, particle_locations=None, particle_weights=None):
        super(ParticleDistribution, self).__init__()
        if particle_locations is None or particle_weights is None:
            # Initialize with single particle at origin.
            self.particle_locations = np.zeros((1, n_mps))
            self.particle_weights = np.ones((1,))
        elif n_mps is None:
            self.particle_locations = particle_locations
            self.particle_weights = np.abs(particle_weights)
            self.particle_weights = self.particle_weights / np.sum(self.particle_weights)
        else:
            raise ValueError('Either the dimension of parameter space, `n_mps`, or the particles, `particle_locations` and `particle_weights` must be specified.')