Copy upper triangle to lower triangle in a python matrix -
iluropoda_melanoleuca bos_taurus callithrix_jacchus canis_familiaris ailuropoda_melanoleuca 0 84.6 97.4 44 bos_taurus 0 0 97.4 84.6 callithrix_jacchus 0 0 0 97.4 canis_familiaris 0 0 0 0
this short version of python matrix have. have information in upper triangle. there easy function copy upper triangle down triangle of matrix?
if understand question correctly, believe work
for in range(num_rows): j in range(i, num_cols): matrix[j][i] = matrix[i][j]
Comments
Post a Comment