code: def _M2_sparse(Xvar, mask_X, Yvar, mask_Y, weights=None):
      
      C = np.zeros((len(mask_X), len(mask_Y)))
      C[np.ix_(mask_X, mask_Y)] = _M2_dense(Xvar, Yvar, weights=weights)
      return C
docs: 2nd moment matrix exploiting zero input columns