Rob Beezer wrote:
> Jason,
>
> Thanks for all the suggestions and typos.  With this format it is hard
> sometimes to deal with some of the details.  You'll notice I didn't
> try to explain what symplectic_form() produces.  ;-)  I thought about
> the case of not having enough eigenvectors to fill out the matrix as I
> annotated the command, but I think I now have an idea that might do it
> in a few words.
>
>   

Yes, I like how you did it.  I wasn't going to bring it up, since it 
works the same in mathematica and maybe matlab too.  However, when we 
wrote the code, someone brought up that case and wanted clarification in 
the documentation.

Also, your matrix_from_rows and matrix_from_columns can be written as:

A[:, (8,2,8)]  (i.e., all rows, columns 8, 2, and 8)

A[(2,5,1), :] (i.e., rows 2, 5, and 1; all columns)

Those parentheses could also be brackets (i.e., a list instead of a 
tuple), but then it may be confusing seeing two sets of brackets that 
are doing two different things.

Your matrix from rows and columns could also be:

A[(2,4,2), (3,1)]


Also, negative indices are allowed:

A[:, (-1, 0)] is the matrix formed by taking the last column, then the 
first column

Anyways, I find the indexing notation above easier than the 
matrix_from_rows and matrix_from_columns functions.  I can see why 
others prefer the verbose functions, though. You might mention that the 
syntax for the indexing (as above) is similar to matlab.

Again, thanks for all of your work!

Jason



> Rob
>
> On May 9, 11:21 am, Jason Grout <jason-s...@creativetrax.com> wrote:
>   
>> Rob Beezer wrote:
>>     
>>> I've put together a quick reference sheet (two pages) for linear
>>> algebra commands in Sage.  I'll do a bit more clean-up on this before
>>> posting a final copy on the wiki in a couple days, so I know there is
>>> a bit more work to do.  Specifically, I might reorder the sections if
>>> I come up with a more logical presentation.
>>>       
>>> I'd really like to hear about any glaring omissions, or gross
>>> misunderstandings of categories, vector spaces, modules, rings and/or
>>> fields.  Draft copy at
>>>       
>>> http://buzzard.ups.edu/sage/quickref-linalg.pdf
>>>       
>>> Thanks,
>>> Rob
>>>       
>> Nice!
>>
>> Comments:
>>
>> * The first entry of a vector is not 0! (zero factorial :), but zero.
>> Unfortunately, it seems like it is always confusing to read mathematics
>> that has exclamation points.  Same comment for the matrix section.
>>
>> * u.norm() == u.norm() ?   That seems confusing.  Do you mean something
>> like u.norm(2)?
>>
>> * A.inverse should have parentheses (i.e., A.inverse() )
>>
>> * under row operations, "e.g." should be followed with a comma
>>
>> * You might mention the very powerful and intuitive indexing and setting
>> available using the bracket notation.  See the docstrings of __getitem__
>> and __setitem__ in sage/matrix/matrix0.pyx for lots and lots of
>> examples.  This notation puts us roughly on par with octave and matlab
>> for easy creation of submatrices and setting elements of a submatrix.
>>
>> * in eigenmatrix_right/left, P may not have eigenvectors.  If the
>> algebraic multiplicity does not equal the geometric multiplicity for a
>> particular eigenspace, then P pads the eigenvectors with zero vectors so
>> that you still have AP=PD (for _right).  If A is diagonalizable, then
>> your statement is correct; the columns of P are eigenvectors of A.
>>
>> * Some of the decompositions don't work for all base rings; you might
>> mention that (e.g., QQ doesn't have SVD)
>>
>> * .change_right(R) has unnecessary commas around the last "R" in the
>> explanation
>>
>> Again, very nice!  I will probably use this in the next few weeks.
>>
>> Thanks,
>>
>> Jason
>>     
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-edu" group.
To post to this group, send email to sage-edu@googlegroups.com
To unsubscribe from this group, send email to 
sage-edu+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-edu?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to