Flatten upper triangular matrix

Hi,

You should be able to use triu_indices() here to get the indices and then just index adjacency with it using a single function call.

1 Like