Code Discrete Fourier Transform Image

Thank you crackwitz. I now understand how it works, it returns the closest lower even value.
bin(np.uint8(-2))=bin(np.uint8(254))…