just wondering if there is any smart way to do the following.
I have an N dimensional array representing a 3x3 grid
grid = [[1,2,3], [4,5,6], [7,8,9]]
To get the first line , I do the following:
grid[0][0:3] >> [1,2,3]
To get the first column , I would like to do something like this (although this is not possible):
grid[0:3][0] >> [1,4,7]
Does NumPy support something like this by accident?
Any ideas?
source share