Returns a copy of population with stars resampled (with replacement).

        Used in bootstrap estimate of FPP uncertainty.

        TODO: check to make sure constraints properly copied!

def resample(self):
        """
        Returns a copy of population with stars resampled (with replacement).

        Used in bootstrap estimate of FPP uncertainty.

        TODO: check to make sure constraints properly copied!
        """
        new = copy.deepcopy(self)
        N = len(new.stars)
        inds = np.random.randint(N, size=N)

        # Resample stars
        new.stars = new.stars.iloc[inds].reset_index()

        # Resample constraints
        if hasattr(new, '_constraints'):
            for c in new._constraints:
                new._constraints[c] = new._constraints[c].resample(inds)

        new._make_kde()
        return new