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). > sage: u=vector([1,2,3]) > sage: matrix(u) > [1 2 3] > sage: u.transpose() > [1] > [2] > [3] If I were BDFL I'd ban the above. ;-) It converts vectors to matrices without warning. Implicitly says vectors are row vectors, while for a 3x3 matrix A, the expressions u*A and A*u both compute just fine and so there is no such preference here. Can't have your cake and eat it too. If I were to "conjugate-transpose" a vector, I'd want it to remain a vector, not get upgraded to an n x 1 matrix. Or go entirely to a strict dichotomy between row vectors and column vectors. I'd default to implementing the proposed .star() as returning a vector. > I'm not sure how I feel about .star() yet. I do think the .H property > should be implemented, which would be consistent with numpy. +10 to having .H -5 to having to explain to students why you don't write it as .H() Not as belligerent as I sound, Rob ;-) -- 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