I would like to select the x, y values from an array of the same, for example :
xy = [[0.0, 3], [0.1, 1], [0.2, -1]]
where y > 0, so the output should be
array[ [0.0, 3], [0.1, 1]]
I tried something like
[x for x in xy if y>0]
, but it returns the following error :
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all().
>= 0?