Error in code compilation

while running this line of code :
“new_image[row][col] += image[row+i][col+j]*image_filter[i][j]”

I am getting the following the error:
15 for i in range(F):
16 for j in range(F):
—> 17 new_image[row][col] += image[row+i][col+j]*image_filter[i][j]
18
19 if new_image[row][col] > 255:

ValueError: setting an array element with a sequence.

hey @S18CC-OL0033 ,
The error means , that you are by mistake setting an array as the element of any array , which is not correct. So kindly have a look at that.

Before setting the value , try printing both and see that they do have the same data types , else it will give an error.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.