天天看點

npwhere周遊

not0loc = np.where(img!=0)
for idex in range(len(not0loc[0])):
    locy = not0loc[0][idex]
    locx = not0loc[1][idex]
    img[locy, locx] = 255