2020-01-22 14:27:15 +08:00

6 lines
144 B
Python

import mipylib.numeric as np
def in_bounds(x, lb, ub):
"""Check if a point lies within bounds."""
return np.all((x >= lb) & (x <= ub))