def __init__(self, x, w=None):
        self.x = np.squeeze(x)
        if self.x.shape == ():
            self.x = np.array([self.x])
##        #JP added and removed again b/c still broadcast error
##        if self.x.ndim == 1:
##            self.x = self.x[:,None]
        self.n = self.x.shape[0]
        if w is None:
            w = np.ones(self.n, np.float64)
        else:
            if w.shape[0] != self.n:
                raise ValueError('incompatible shape for weights w')
            if np.any(np.less(w, 0)):
                raise ValueError('weights should be non-negative')
        self.w = w*w.sum() / 1.0
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/cox.py/Discrete.__init__/swapped operands of `/`