#12604: A patch adding .dimensions() to a matrix.
-----------------------------+----------------------------------------------
   Reporter:  blundell       |          Owner:  tbd       
       Type:  enhancement    |         Status:  needs_info
   Priority:  trivial        |      Milestone:  sage-5.0  
  Component:  PLEASE CHANGE  |       Keywords:  Matricies 
Work_issues:                 |       Upstream:  N/A       
   Reviewer:                 |         Author:            
     Merged:                 |   Dependencies:            
-----------------------------+----------------------------------------------
Changes (by dsm):

  * status:  new => needs_info


Comment:

 I'm not sure we can use ".dimensions()" for this, at least by itself.  Our
 terminology is already a little weird.. in the parent MatrixSpace, we
 have:

 {{{
 sage: m = Matrix(QQ, 3, 5)
 sage: m
 [0 0 0 0 0]
 [0 0 0 0 0]
 [0 0 0 0 0]
 sage: parent(m)
 Full MatrixSpace of 3 by 5 dense matrices over Rational Field
 sage: ms = parent(m)
 sage: ms.dim
 ms.dimension  ms.dims
 sage: ms.dims()
 (3, 5)
 sage: ms.dimension()
 15
 }}}

 Those aren't the names I'd have chosen, but given that they're there, we
 shouldn't have .dims() work for the MatrixSpace and .dimensions() work for
 an element in the space.

 .dimensions() is a better name, IMHO, so maybe we should make both
 .dimensions() and .dimension() work for the MatrixSpace and for a Matrix,
 and let .dims() be an alias for .dimensions() for backward compatibility
 purposes.  Above my pay grade, though.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12604#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to