example = pyp_newclasses.loadPedigree(optionsfile='denny.ini')
amatrix = pyp_newclasses.NewAMatrix(example.kw)
amatrix.form_a_matrix(example.pedigree)
amatrix.tofile('Ainv.txt')
Matrices may also be written to a binary format. The default value of the nrm_format pedigree option is text. To write files in binary format you must either specify the value of the nrm_format option as binary before you load your pedigree file or use the nrm_format keyword when you call NewAMatrix.save:
amatrix.tofile('Ainv.bin',nrm_format='binary')
octave:1> myfile = fopen ("Ainv.txt", "r");
octave:2> ainv = fscanf(myfile,'%f',[18,18])