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