def n_ess(self):
        """
        Returns the effective sample size (ESS) of the current particle
        distribution.

        :type: `float`
        :return: The effective sample size, given by :math:`1/\sum_i w_i^2`.
        """
        return 1 / (np.sum(self.particle_weights**2))