I have a 2D numpy
array, how can I keep only rows that contain a specific value, and then flatten the array keeping only unique values.
array([[0, 2],
[1, 3],
[2, 4],
[3, 5],
[4, 6],
[5, 7]])
If I need to keep only rows containing 2
, I expect the result ([0,2,4])