[Numpy-tickets] [NumPy] #292: Make repmat work for arbitrary dimensions

NumPy numpy-tickets at scipy.net
Sun Sep 24 20:20:18 CDT 2006

#292: Make repmat work for arbitrary dimensions
 Reporter:  baxissimo    |        Owner:  somebody   
     Type:  enhancement  |       Status:  new        
 Priority:  normal       |    Milestone:  1.0 Release
Component:  numpy.lib    |      Version:             
 Severity:  normal       |   Resolution:             
 Keywords:               |  
Changes (by baxissimo):

  * milestone:  => 1.0 Release


 Incidentally, I noticed that repmat currently has the comment:
 '# should figure out how to generalize this one.'

 That's exactly what the above 'reparray' function does.

 Repmat itself could be generalized with minimal backward compatibility
 issues by using a *varg:

 def repmat(a,*shape):
     return reparray(a,shape)

 Then "rempat(a,m,n)" in existing code will continue to work.

Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/292>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list