romspline/helpers.py
def _check_patch(i, dileft, diright, dim):
  """Check if i is too close to interval endpoints and adjust if so."""
  if i <= dileft: 
    ans = dileft
  elif dim-i <= diright: 
    ans = dim-diright
  else:
    ans = i
  return ans
Check if i is too close to interval endpoints and adjust if so.
Check if i is too close to interval endpoints and adjust if so.
Check if i is too close to interval endpoints and adjust if so .
def _check_patch(i, dileft, diright, dim):
  if i <= dileft: 
    ans = dileft
  elif dim-i <= diright: 
    ans = dim-diright
  else:
    ans = i
  return ans
def _check_patch ( i , dileft , diright , dim ) : if i <= dileft : ans = dileft elif dim - i <= diright : ans = dim - diright else : ans = i return ans
Check if i is too close to interval endpoints and adjust if so.
Check if i is too close to interval endpoints and adjust if so .
"""Check if i is too close to interval endpoints and adjust if so."""
i
dileft
diright
dim