Sample an item uniformly from a stratum

        Parameters
        ----------
        stratum_idx : int
            stratum index to sample from

        replace : bool, optional, default True
            whether to sample with replacement

        Returns
        -------
        int
            location of the randomly selected item in the original input array

def _sample_in_stratum(self, stratum_idx, replace = True):
        """Sample an item uniformly from a stratum

        Parameters
        ----------
        stratum_idx : int
            stratum index to sample from

        replace : bool, optional, default True
            whether to sample with replacement

        Returns
        -------
        int
            location of the randomly selected item in the original input array
        """
        if replace:
            stratum_loc = np.random.choice(self.sizes_[stratum_idx])
        else:
            # Extract only the unsampled items
            stratum_locs = np.where(~self._sampled[stratum_idx])[0]
            stratum_loc = np.random.choice(stratum_locs)

        # Record that item has been sampled
        self._sampled[stratum_idx][stratum_loc] = True
        self._n_sampled[stratum_idx] += 1
        # Get generic location
        loc = self.allocations_[stratum_idx][stratum_loc]
        return loc