I have problem with my code, i cannot print or change value of Adjacency matrix, can you help me sir? i have code like this
for i in range(len(A.todense())):
for j in A[i].todense()*1:
print(j)
and the output is
[[0 0 0 0 0 1 1 0]]
[[0 0 0 0 0 0 0 1]]
[[0 0 0 0 0 1 0 0]]
[[0 0 0 0 0 1 0 0]]
[[0 0 0 0 0 0 0 1]]
[[1 0 1 1 0 0 1 0]]
[[1 0 0 0 0 1 0 0]]
[[0 1 0 0 1 0 0 0]]
and want to change zero to one, or one to zero, but i cannot print or change with A.todense()[i][j]. Can you help me to change the value of adjacency matrix? Thanks you