Hi @Irfan_Alahi,
Let’s do an exercise, below is a 2D array representing a photo:
array([[ 0, 1, 2, 3, 4, 5, 6, 7],
[ 8, 9, 10, 11, 12, 13, 14, 15],
[16, 17, 18, 19, 20, 21, 22, 23],
[24, 25, 26, 27, 28, 29, 30, 31],
[32, 33, 34, 35, 36, 37, 38, 39],
[40, 41, 42, 43, 44, 45, 46, 47]])
-
What is the height of the photo?
-
When you count its height, are you counting the number of rows or the number of columns?
-
If I understand you correctly, height should be a “y-axis” thing, are you referring such “y-axis” thing to counting the number of rows or the number of columns?
-
If you cut horizontally so that the photo is divided in to 3 equal, smaller photos of the same width as the original one but one-third the height, and now we only want the middle “sub-” photo, are we slicing some rows out, or some columns out? Note that if you are slicing some rows out, you do a_prev_pad[row_idx_start:row_idx_end, :]
These are guidance questions for you to clear your question, and if you think your questions have been cleared, there is no need to answer them here, otherwise, I would ask you to provide your answers to the above questions so that I know how you approach them which is very relevant to your question.
Cheers,
Raymond