I have two lists that I am trying to compare with < or > in python.
One (list1) is a slope and then a horizontal line (picture a obtuse angle of around 130 degrees) the second is a linear function with a negative slope that I calculated from the first list (list2). What I would like to do is compare the two lists list1 and list2 and create a new list3 where list3 = all the points in list1>list2. I am having trouble determining how to approach this. I have attempted list comprehension but I get the error
ValueError: The truth value of an array with more than one element is ambiguous.
v = [c for c in f if c > y]
list1= [0.0, 0.36, 0.34, 0.32, 0.32, 0.3, 0.3, 0.28, 0.28, 0.26, 0.26, 0.24, 0.24, 0.22, 0.22, 0.2, 0.2, 0.18, 0.18, 0.16, 0.16, 0.14, 0.14, 0.12, 0.12, 0.1, 0.1, 0.08, 0.08, 0.06, 0.06, 0.04, 0.04, 0.02, 0.02, 0.0,..., 0.0]
list2= [ 0.36 0.35 0.34 ..., -9.62 -9.63 -9.64]
Any help, advice, or guidance would be greatly appreciated. Also please let me know if my question is unclear in anyway.
If you mean that
list3is the collection of values fromlist1where the corresponding value inlist2is smaller, then: