I have a list of arrays like:
a = [array([6,2]),array([8,3]),array([4,2])] I tried max(a) which returns the following error:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() I want it to return either a list or array like:
In: max(a) Out: [8,3] I don't want to convert the inner arrays to list, because the size of the list is very big. Also I purposefully created like that to perform array operations.