def _HCCM1(results, scale):
 if (scale.ndim == 1):
  H = np.dot(results.model.pinv_wexog, (scale[:, None] * results.model.pinv_wexog.T))
 else:
  H = np.dot(results.model.pinv_wexog, np.dot(scale, results.model.pinv_wexog.T))
 return H

def _HCCM1 ( results , scale ) : if ( scale . ndim == 1 ) : H = np . dot ( results . model . pinv_wexog , ( scale [ : , None ] * results . model . pinv_wexog . T ) ) else : H = np . dot ( results . model . pinv_wexog , np . dot ( scale , results . model . pinv_wexog . T ) ) return H
sandwich with pinv(x) * scale * pinv(x) .