How can i set a list of pixels efficiently using python.
For example if i have:
import numpy as np
img = np.zeros((700, 200, 3), dtype=np.uint8)
l = [[300, 101], [200, 102], [150, 103], [300, 104], [88, 105], [66, 106], [666, 107]]
i just want to set pixels with l coordinates to black color.
I know i can do something like this:
for p in l:
img[p[0], p[1]] = (0, 0, 0)
I wonder if there is something more efficient.