def var(self):
        """
        Returns a vector containing the variances of the discrete
        distributions.

        A vector is returned containing the variance for each row of
        `xk`, using the probabilities in the corresponding row of
        `pk`.
        """

        mn = self.mean()
        xkc = mn[:, None] - self.xk

        return (self.pk * (self.xk - xkc)**2).sum(1)
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/duration/hazard_regression.py/rv_discrete_float.var/swapped operands of `-`