On 12/30/10 1:22 AM, Rob Beezer wrote:
On Dec 29, 10:31 pm, Jason Grout<jason-s...@creativetrax.com> wrote:
Notice that there is an underlying ideology that vectors are rows:
Yes, I have noticed that. Ties go to rows:
sage: matrix( [vector(QQ, [1,2,3]), vector(QQ,[4,5,6])] )
[1 2 3]
[4 5 6]
But the above is the first example where I have been tempted to
suggest some optional keyword to cause columns to win the tie. In
other words, I am writing instructions for beginning students on how
to use Sage for linear algebra and I've been surprised at how little
trouble I have had maintaining a column-oriented development alongside
Sage's row-oriented preferences. Excepting the above - I want to
build matrices out of sets of vectors where the vectors become columns
(as optional behavior).
+1. I usually use a transpose after constructing a matrix so that the
vectors in the constructor give the columns.
I was thinking of another matrix constructor that is a very thin wrapper
around matrix(). Something like:
def column_matrix(*args, **kwds):
return matrix(*args, **kwds).transpose()
Jason
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org