linspace and arange implemented in objc