사소한 Tip . 오류 해결법/python
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Js.Y
2023. 8. 1. 10:51
728x90
반응형
Python, ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
My question is related to the answer to my previous question. the difference between the code in the previous solutions and the current code on this question is as follows: on my code, I have to se...
stackoverflow.com
내 경우엔 오픈소스 내 아래 코드에서 이슈가 생겼었는데, 이걸 다음과 같이 변경해주니 정상 동작했다.
if not (x_coord % 640 == 0 or y_coord % 640 == 0):
=> if not (x_coord % 640 == 0).any() or (y_coord % 640 == 0).any():
728x90
반응형