On 1/26/12 12:13 PM, Robert Bradshaw wrote:
To get a quick sense of what people think about this, I've decided to
rephrase this as a survey.  To be clear, though this coincides with
Matlab syntax, the intent is not to try to make Sage a Matlab clone,
rather it is to add a missing feature to Sage.

Should [a, b; c, d] be a valid syntax for matrix construction in Sage?

[ ] Yes, I love this syntax! It would be make life better for me and
my students.
[ ] I wouldn't oppose, but may require some convincing.
[ ] No, that's a horrible idea.


I waffle between Yes, and Yes with convincing. I'm trying it out now to see how I feel about it. I feel like we shouldn't extend python too much, but this syntax is very tempting.



Why?


Should the default basering be more linear-algebra friendly? E.g. R ->
Frac(R), RR ->  RDF.

[ ] Yes, that would take away a lot of pain/be what I'd have to
specify manually anyway.
[ ] Could be handy, but the drawbacks are significant.
[ ] No, matrices over QQ are for sissies, real mathematicians work
over ZZ unless otherwise specified.

I should just note several areas that ZZ matrices come up short (intuitively) when you assume you are usually working over fields:

sage: a=[1,2; 3,4]
sage: a[0,0]=1/2
(error...)
sage: a.rational_form()
(error...)
sage: a.rescale_row(1/2)
(error...though the error message is a little more helpful and says to use with_rescaled_row...)

I agree mostly with the people who say that [] and matrix() should be consistent. I've resigned myself to always declaring my ring as QQ, etc.

Thanks,

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

Reply via email to