unit step function in python