[Numpy-discussion] repmat equivalent?

Albert Strasheim fullung at gmail.com
Thu Feb 23 04:37:04 EST 2006


Hello

The problem is that repeat is not the same as repmat.

For example:

>> repmat([1 2; 3 4], 2, 1)
ans =
     1     2
     3     4
     1     2
     3     4

In [12]: repeat(array([[1, 2],[3,4]]), 2)
Out[12]:
array([[1, 2],
       [1, 2],
       [3, 4],
       [3, 4]])

How can I use the repeat function as is to accomplish this?

Thanks.

Regards

Albert


On 2/23/06, Nadav Horesh <nadavh at visionsense.com> wrote:
> You should really use the "repeat" function.
>
>    Nadav.

<snip>




More information about the NumPy-Discussion mailing list