Added a linspace function similar to numpy's linspace.