def rvs(self):
        """
        Returns a random sample from the discrete distribution.

        A vector is returned containing a single draw from each row of
        `xk`, using the probabilities of the corresponding row of `pk`
        """

        n = self.xk.shape[0]
        u = np.random.uniform(size=n)

        ix = (u[:, None] < self.cpk).sum(1)
        ii = np.arange(n, dtype=np.int32)
        return self.xk[(ii,ix)]
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/duration/hazard_regression.py/rv_discrete_float.rvs/swapped operands of `<`