Explore Library
Code QuizIntermediate

Horizontal Flip with NumPy

Spot the axis mistake when flipping an image left-to-right for augmentation.

Codepython
import numpy as np

# image shape is (H, W, C)
def horizontal_flip(image):
    # flip the image left-to-right
    return image[::-1, :, :]

What is the bug in this horizontal_flip function?