I'm trying to convert an image into a matrix.
values = []
normal = []
for x in (arr):
for y in (arr):
if arr[x,y] > 1:
normal.append(1)
else:
normal.append(0)
And error says:
"ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()"
Thank in advance.