[NumPy-Tickets] [NumPy] #1953: fill_diagonal fail on rectangular arrays

NumPy Trac numpy-tickets@scipy....
Sun Sep 18 00:47:28 CDT 2011


#1953: fill_diagonal fail on rectangular arrays
---------------------+------------------------------------------------------
 Reporter:  dimasad  |       Owner:  somebody   
     Type:  defect   |      Status:  new        
 Priority:  normal   |   Milestone:  Unscheduled
Component:  Other    |     Version:  devel      
 Keywords:           |  
---------------------+------------------------------------------------------
 For rectangular arrays that are more tall than large, fill_diagonal wraps
 up.

 Example:

 {{{
 >>> a = np.zeros((4,2))
 >>> np.fill_diagonal(a,4)
 >>> a
 array([[ 4.,  0.],
        [ 0.,  4.],
        [ 0.,  0.],
        [ 4.,  0.]])
 }}}

 When it should be just
 {{{
 >>> a
 array([[ 4.,  0.],
        [ 0.,  4.],
        [ 0.,  0.],
        [ 0.,  0.]])
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1953>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list