Sample an item from the strata

        Parameters
        ----------
        pmf : array-like, shape=(n_strata,), optional, default None
            probability distribution to use when sampling from the strata. If
            not given, use the stratum weights.

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

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

        stratum_idx : int
            the stratum index that was sampled from

def sample(self, pmf=None, replace=True):
        """Sample an item from the strata

        Parameters
        ----------
        pmf : array-like, shape=(n_strata,), optional, default None
            probability distribution to use when sampling from the strata. If
            not given, use the stratum weights.

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

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

        stratum_idx : int
            the stratum index that was sampled from
        """
        stratum_idx = self._sample_stratum(pmf, replace=replace)
        loc = self._sample_in_stratum(stratum_idx, replace=replace)
        return loc, stratum_idx