Re: [Numpy-discussion] is there a better way to do this arrayrepeat?

2009-08-17 Thread Citi, Luca
As you stress on repeat the array ... rather than repeat each element, you may want to consider tile as well: np.tile(a, [10,1]) array([[0, 1, 2], [0, 1, 2], [0, 1, 2], [0, 1, 2], [0, 1, 2], [0, 1, 2], [0, 1, 2], [0, 1, 2], [0, 1, 2],

Re: [Numpy-discussion] is there a better way to do this arrayrepeat?

2009-08-17 Thread Chris Colbert
That's exactly it. Thanks! On Mon, Aug 17, 2009 at 5:24 AM, Citi, Lucalc...@essex.ac.uk wrote: As you stress on repeat the array ... rather than repeat each element, you may want to consider tile as well: np.tile(a, [10,1]) array([[0, 1, 2],       [0, 1, 2],       [0, 1, 2],       [0, 1,