I've been oddly bashing my head against this problem for several hours, and would appreciate any help!
I would like to create a (for example) 100x100 array in which each index is a (x,y) coordinate. The overall goal here is the following:
I have x,y coordinates and would like to arrange them in a 2D space so that I can use the np.diagonal function to return the (x,y) coordinates along a line. I'll then use those (x,y) points to compare particular values.
The first step here is actually creating the array and I just can't seem to do it.
arr[(x,y)],arr[x][y],arr[x,y], ...(100, 100, 2), e.g.a = np.empty((100, 100, 2)). Callingnp.diagonal(a)will return an array of shape(2, 100).