I am trying to copy a section of an input 2d array "img" and mirroring that section and copying it into the 2d array "out"
The following code does what I need
a = numpy.zeros(shape=(pad, pad))
a[:,:]=img[0:pad,0:pad]
out[0:pad,0:pad]=a[::-1,::-1]
But simply doing the following does not
out[0:pad,0:pad]=img[0:pad:-1,0:pad:-1]
and instead returnsValueError: could not broadcast input array from shape (0,0) into shape (2,2) for pad=2 and I am not sure why.