Guest User

Untitled

a guest
Feb 17th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. lst_1 = [114170, 113970]
  2.  
  3. lst_2 = [(array([114250, 114240, 114230, 114220, 114210, 114200, 114190, 114180,
  4. 114170, 114160, 114150, 114140, 114130, 114120, 114110, 114100,
  5. 114090]),
  6. array([114080, 114070, 114060, 114050]),
  7. array([114040, 114030, 114020, 114010, 114000, 113990, 113980, 113970,
  8. 113960, 113950, 113940, 113930, 113920, 113910, 113900, 113890,
  9. 113880]))]
  10.  
  11. In [79]: res = [i for i,x in enumerate(lst_2[0]) if np.intersect1d(x, lst_1).size > 0]
  12.  
  13. In [80]: res
  14. Out[80]: [0, 2]
Add Comment
Please, Sign In to add comment