As I know the forms of G and H are [Ik;P] and [P^T; In-k] but you set G as a concatenation of [P;Ik] and H as [In-k;P^T]. Am I wrong??
def HtoG(H):
n = np.shape(H)[1]
k = n - np.shape(H)[0]
P = HtoP(H)
Ik = np.eye(k)
G = np.concatenate((P, Ik), axis=1)
return G.astype(int)
def GtoH(G):
k = np.shape(G)[0]
n = np.shape(G)[1]
P = GtoP(G)
PT = np.transpose(P)
Ik = np.eye(n - k)
H = np.concatenate((Ik, PT), axis=1)
return H.astype(int)
As I know the forms of G and H are [Ik;P] and [P^T; In-k] but you set G as a concatenation of [P;Ik] and H as [In-k;P^T]. Am I wrong??