change to step function

Add np.allclose to compare the input value of t to see if it was close
to the upper domain.