def pts_to_poststep(x, *args):
 steps = np.zeros(((1 + len(args)), ((2 * len(x)) - 1)))
 steps[0, 0::2] = x
 steps[0, 1::2] = steps[0, 2::2]
 steps[1:, 0::2] = args
 steps[1:, 1::2] = steps[1:, 0:(-2):2]
 return steps

def pts_to_poststep ( x , * args ) : steps = np . zeros ( ( ( 1 + len ( args ) ) , ( ( 2 * len ( x ) ) - 1 ) ) ) steps [ 0 , 0 : : 2 ] = x steps [ 0 , 1 : : 2 ] = steps [ 0 , 2 : : 2 ] steps [ 1 : , 0 : : 2 ] = args steps [ 1 : , 1 : : 2 ] = steps [ 1 : , 0 : ( - 2 ) : 2 ] return steps
convert continuous line to post-steps .