ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() <Figure size 600x600 with 3 Axes>