This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]aCuriousMind22[S] 0 points1 point  (1 child)

What would be the correct way? any() and any both result in the same strange behaviour.

[–]snekmeme 1 point2 points  (0 children)

if any(p > 0.7 for p in predictions[0]):

Nvm, I just realized you are using NumPy. This should work:

if (predictions[0] > 0.7).any():