Hi,
I have a program:
def AdjacencyMatrix(dim, pairs):
matrix1 = (zeros((dim,dim)))
for (first,second) in pairs:
matrix1[first,second]=1
matrix1[second,first]=1
print '\nAdjacency Matrix\n'
print matrix1
But I get an error:
TypeError: 'int' object is not iterable
Can anyone help? Thank you!