core.matrix icon indicating copy to clipboard operation
core.matrix copied to clipboard

equivalent of numpy.linspace

Open shark8me opened this issue 8 years ago • 1 comments

Hi,

Does core.matrix have an equivalent of the numpy.linspace function, which creates a sequence of N evenly spaced points between start and end? A function of the same name also exists in Matlab.

Thanks!

shark8me avatar Oct 16 '17 01:10 shark8me

Sounds useful, though not sure if it deserves a first class protocol function in core.matrix.

(m/array (range start end step)) gets you most of the way there..... just needs a but of wrapping to handle the different parameter options and edge cases I think.

mikera avatar Feb 06 '18 10:02 mikera