2021-03-10 17:19:43 +08:00

6 lines
149 B
Python

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