Improve linspace implementation with non-scalar inputs
#2712
+167
−105
linspace implementation with non-scalar inputs
#2712