[NumPy-Tickets] [NumPy] #1472: Assigning Transpose of "slice" of a "3d" Array Always Gives a Symmetric Array

NumPy Trac numpy-tickets@scipy....
Mon May 3 13:52:31 CDT 2010


#1472: Assigning Transpose of  "slice" of a "3d" Array Always Gives a Symmetric
Array
-------------------------+--------------------------------------------------
  Reporter:  TomW        |       Owner:  somebody                         
      Type:  defect      |      Status:  closed                           
  Priority:  normal      |   Milestone:  Unscheduled                      
 Component:  numpy.core  |     Version:  1.3.0                            
Resolution:  invalid     |    Keywords:  multidimensional array, transpose
-------------------------+--------------------------------------------------
Changes (by charris):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 The transpose is a view of the same data that is being assigned, hence the
 result you see is what should happen. If you want to transpose the last
 two indices, you should interchange them using swapaxes. If you just want
 to transpose only that slice with the leading index zero, you should use
 A[0].T.copy() on the rhs.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1472#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list