ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Author: li54426Created Jul 10, 2022Updated Nov 9, 2023

File "C:\software\anconda\lib\site-packages\sko\GA.py", line 57, in penalty_ueq = np.array([np.sum(np.abs([max(0, c_i(x)) for c_i in self.constraint_ueq])) for x in self.X]) ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()