def _invert_dummies(self, dummies):
        '''
        For the sake of computational efficiency (i.e., to avoid lots of
        large matrix multiplications in the backends), invert the dummy-coding
        process and represent full-rank dummies as a vector of indices into the
        coefficients.
        '''
        vec = np.zeros(len(dummies), dtype=int)
        for i in range(1, dummies.shape[1]):
            vec[dummies[:, i] == 1] = i
        return vec
def _invert_dummies ( self , dummies ) : vec = np . zeros ( len ( dummies ) , dtype = int ) for i in range ( 1 , dummies . shape [ 1 ] ) : vec [ dummies [ : , i ] == 1 ] = i return vec
For the sake of computational efficiency (i.e., to avoid lots of
        large matrix multiplications in the backends), invert the dummy-coding
        process and represent full-rank dummies as a vector of indices into the
        coefficients.