[Numpy-tickets] [NumPy] #460: better integration of matrices using properties

NumPy numpy-tickets@scipy....
Sun Sep 30 06:12:41 CDT 2007

#460: better integration of matrices using properties
 Reporter:  batripler    |        Owner:  somebody
     Type:  enhancement  |       Status:  closed  
 Priority:  normal       |    Milestone:  1.1     
Component:  numpy.core   |      Version:  devel   
 Severity:  normal       |   Resolution:  wontfix 
 Keywords:               |  
Changes (by stefan):

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


 This was discussed on the mailing list.  The resulting post:

 From: Travis Oliphant <oliphant@ee.byu.edu>
 To: numpy-discussion <numpy-discussion@lists.sourceforge.net>
 Subject: [Numpy-discussion] .M .A .T .H attribute result
 Date: Fri, 07 Jul 2006 14:21:44 -0600
 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2)
 Message-ID: <44AEC258.9040800@ee.byu.edu>

 I didn't compile the results, but the discussion on the idea of adding
 new attributes to the array object led to the following result.

 Added:  .T attribute to mean self.transpose()


 This was rather controversial with many possibilities emerging.  In the
 end, I think the common case of going back and forth between C-order and
 Fortran-order codes in a wide variety of settings convinced me to make
 .T  a short-hand for .transpose() and add it as an attribute.   This is
 now the behavior in SVN.

 Right now, for self.ndim < 2, this just returns a new reference to self
 (perhaps it should return a new view instead).


 While some were in favor, too many people opposed this (although the
 circular reference argument was not convincing).  Instead a
 numpy.matlib  module was started to store matrix versions of the
 standard array-creation functions and mat was re-labeled to "asmatrix"
 so that a copy is not made by default.


 A few were in favor, but as this is just syntactic sugar for
 .__array__() or asarray(obj) or .view(ndarray) it was thrown out because
 it is not used enough to add an additional attribute


 A few were in favor, but this can now be written .T.conj()  which is not
 bad so does not get a new attribute.


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

More information about the Numpy-tickets mailing list