indexing multidimensional arrays python code example
Example 1: Index through 2d array
int[][]x;//define
for(int i=0;i<x.length;i++){
for(int j=0;j<x[i].length;j++){
//dp something with x[i][j]
}
}
Example 2: how do i index into array
>>> x = np.arange(10)
>>> x[2]
2
>>> x[-2]
8