![](/profiles/wavemetrics/themes/wavemetrics/logo.png)
Igor equivalent for numpy.repeat ?
![](/sites/default/files/styles/thumbnail/public/default_images/Artboard%201_1.png?itok=jeHOCIXy)
J-E Petit
and Happy New Year everyone.
Is there an inbuilt Igor equivalent for the repeat function of numpy?
for an array x=[1,2,3,4], numpy.repeat(x,4) will give [1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4]
thanks for your help!!
Cheers
J-E
Hope this helps,
Kurt
January 4, 2016 at 03:34 am - Permalink
I'm also trying to figure out how to tile a wave, but cannot find something that works properly... (something that would give [1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4] from [1,2,3,4]). A loop with Concatenate would work, but any idea on avoiding loops?
January 4, 2016 at 05:19 am - Permalink
January 4, 2016 at 05:29 am - Permalink
You can use:
Try this:
If you haven't already, I recommend you read the following help topic:
January 4, 2016 at 06:42 am - Permalink
January 4, 2016 at 09:25 am - Permalink
January 6, 2016 at 04:04 am - Permalink