sel2D¶
- tayph.sel2D(arr, xrange, yrange, x=None, y=None)[source] [edit on github]¶
This is used to make a sub-selection of a 2D numpy array based on conditions (limits) of the X and Y axes of the array. The intervals are inclusive.
Example: A = np.ones((10,20)) #Remember: in numpy the y-axis is the first axis. A_sub = A[fun.sel2D(A,[10,15],[3,6],x=np.arange(20),y=np.arange(10))]