[scikit-learn] using numpy repeat

Glenn Schultz glennmschultz at me.com
Mon Oct 14 13:55:02 EDT 2019


I am tying to repeat an array 3 times using the following

numpy.repeat(numpy.linspace(-.5, 3, 8), 3) axis = 0)  

although this repeats each element 3 times sequentially. I trying to repeat the array 
-.5 -0 .5 ... -5 -0 .5

any suggestions to accomplish this are appreciated.   I am relatively sure I can do this with numpy I just can't put my finger on how this is done by reviewing the numpy docs.

Thanks,
Glenn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20191014/616164da/attachment.html>


More information about the scikit-learn mailing list