I am fairly need to Python and need some help. I am trying to load a txt file and store it as a variable, N where N is supposed to be a square matrix. However, when I tried to check, the ndim() of N is 1 and the number of columns is not equal the number of rows.
I tried the following codes:
N = open('Graph2021.txt', 'r').readlines()
N = np.array(M)
Could someone please help. I have attached a screenshot of part of the txt file to show the breakage of the code to separate the columns (I think).
txt file is filled with zeros and ones: