Category : n-dimensional

I have defined a 3-Dimensional matrix like this: vmatriz=np.zeros((n, len(x), len(y))) , where x and y are lists. Now, I have tried to access its elements as follows: for i in range(n): for o in range(len(x)): for p in range(len(y)): dis = math.sqrt((randomobjecti)**2 + (randomobjectop)**2) vmatriz[i][o][j] = constant*dis But I get this error: vmatriz[i][o][j] = ..

Read more