I know that I can get the true bits with the simple loop, but looping is ridiculously slow
locations = []
width, height = mask.shape[0], mask.shape[1]
for x in range(len(0,width)):
for y in range(len(0,height):
if mask[x][y] is 1:
location.append([x,y])
I kidda what to avoid the loop overhead. I am learning python and I do not understand this array[:] thing