import bisect


def find_ge(a, x):
	""" Finds leftmost item greater than or equal to x. """
	i = bisect.bisect_left(a, x)
	if i != len(a):
		#ind = np.where(a==a[i])[0][-1]
		return a[i], i
	raise ValueError