I have a value, say 2016 and a sorted numpy array: [2005, 2010, 2015, 2020, 2025, 2030]. What is the pythonic way to find the 2 values in the array that bound 2016. In this case, the answer will be an array [2015, 2020].
Not sure how to do it other than loop, but hoping for a more numpy based solution
--EDIT:
you can assume that you will never get a value that is in the array, I prefilter for that