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
D.
it looks like repmat is not there anymore... why? use numpy.repeat and numpy.tile, instead! hth, lorenzo.
On 4/30/07, dmitrey openopt@ukr.net wrote:
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
D. _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
if it was excluded for any reasons, corresponding changes in http://www.scipy.org/NumPy_for_Matlab_Users should be done D.
lorenzo bolla wrote:
it looks like repmat is not there anymore... why? use numpy.repeat and numpy.tile, instead! hth, lorenzo.
On 4/30/07, *dmitrey* < openopt@ukr.net mailto:openopt@ukr.net> wrote:
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 D. _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org <mailto:Numpy-discussion@scipy.org> http://projects.scipy.org/mailman/listinfo/numpy-discussion <http://projects.scipy.org/mailman/listinfo/numpy-discussion>
Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
It's not on the matlab page simpy because numpy.tile didn't exist when the page was created. It should be fixed. But repmat is still there in numpy.matlib (I think that was what it was called.) --bb
On 4/30/07, dmitrey openopt@ukr.net wrote:
if it was excluded for any reasons, corresponding changes in http://www.scipy.org/NumPy_for_Matlab_Users should be done D.
lorenzo bolla wrote:
it looks like repmat is not there anymore... why? use numpy.repeat and numpy.tile, instead! hth, lorenzo.
On 4/30/07, *dmitrey* < openopt@ukr.net mailto:openopt@ukr.net> wrote:
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 D. _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org <mailto:Numpy-discussion@scipy.org> http://projects.scipy.org/mailman/listinfo/numpy-discussion <http://projects.scipy.org/mailman/listinfo/numpy-discussion>
Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
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?