I am trying to compare the float in each row and column to a user input (0-255). If the input is within the standard deviation of the float; then I set the values to red. (hence the 255,0,0). I don't understand what this error is iterating through a matrix
user_input = input("Lorum Ipsum : ")
avg_img = sum(images) / len(images)
std_dev = np.std(avg_img, dtype=np.float64)
for i in range(0, len(avg_img)): #i is row
for j in range(0, len(avg_img[i])): #j is column
if (std_dev[i][j] > (user_input)).any() :
avg_img[i][j] = [255.0, 0.0, 0.0]
std_dev?user_input? Please provide a minimal reproducible example.std_devto be, and what it actually is.