I have a code written in Python similar to the following:
def adamic_adar_prediction(graph):
adjacencyMatrix = graph.get_adjacency()
AAMatrix = adamic_adar_score(graph)
AAMatrix = np.array(AAMatrix)
i = (-AAMatrix ).argsort(axis=None, kind='mergesort')
j = np.unravel_index(i, AAMatrix .shape)
sortedList = np.vstack(j).T
print(sortedList.size)
print(sortedList[1658943])
print(sortedList[1658945])
While the result of the first print is 3,316,888 I receive the following error for the last print:
IndexError: index 1658944 is out of bounds for axis 0 with size 1658944
Any idea why this error arises for my array?
print(sortedList[1658943])instead.