def QR_factor(A): col_labels = sorted(A.D[1], key=repr) Acols = dict2list(mat2coldict(A), col_labels) Qlist, Rlist = aug_orthonormalize(Acols) #Now make Mats Q = coldict2mat(Qlist) R = coldict2mat(list2dict(Rlist, col_labels)) return Q, R
def QR_factor(A): col_labels = sorted(A.D[1], key=repr) Acols = dict2list(mat2coldict(A),col_labels) Qlist, Rlist = aug_orthonormalize(Acols) #Now make Mats Q = coldict2mat(Qlist) R = coldict2mat(list2dict(Rlist, col_labels)) return Q,R
def dict2list(dct, keylist): return python_lab.dict2list(dct, keylist) def list2dict(L, keylist): return python_lab.list2dict(L, keylist)
def dict2list(dct, keylist): return python_lab.dict2list(dct, keylist)