Python Numpy Linspace Algorithm Design