I would like to select a piece of a 2D array from a large 2D array, I know how to do this using for loops but I was wondering if there is a more effective way of achieving this.
Example:
[0,0,0,0,0,1,0]
[0,0,0,3,0,1,0]
[0,0,0,0,0,1,0]
[0,0,0,0,0,1,0]
From this array I would like to create a new array containing
[0.0.1]
[3.0.1]
[0.0.1]
So are there any better ways to create this second array than using some simple for loops?