dmitrey kirjoitti:
> What's wrong?
>
> start python shell;
>
> from numpy import sin => all ok
>
> from numpy import repmat =>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ImportError: cannot import name repmat
In numpy, the equivalent function is called tile:
>>> from numpy import *
>>> a = array([[1,2],[3,4]])
>>> tile(a, (2,3))
array([[1, 2, 1, 2, 1, 2],
[3, 4, 3, 4, 3, 4],
[1, 2, 1, 2, 1, 2],
[3, 4, 3, 4, 3, 4]])
I note that http://www.scipy.org/NumPy_for_Matlab_Users advertises
repmat instead of tile. (repmat is in numpy.matlib, a compatibility
wrapper library) Maybe this should be fixed?
--
Pauli Virtanen
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion