A luminance conversion applies the standard weights to the wrong color channels.
Codepython
import numpy as np
R = img[:, :, 0]
G = img[:, :, 1]
B = img[:, :, 2]
# Convert RGB to grayscale using luminance weights
gray = 0.114 * R + 0.587 * G + 0.299 * B