Looking at a numpy array, i find two methods to get an element from the answers given to this question: How to call an element in a numpy array?.
There are the two methods:
a[i][j] or a[i,j]
Here is a minimum reproducable example:
import numpy as np
a = np.arange(15).reshape(3, 5)
'''
array([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[10, 11, 12, 13, 14]])
'''
print(a[1][1]) # returns 6
print(a[1,1]) # return 6
Both appear to give the same result, so is one method better than the other ?