Opened 11 years ago
Last modified 5 weeks ago
#12354 new enhancement
Preparse matrix literals of the form [a,b;c,d]
Reported by: | robertwb | Owned by: | jason, was |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | linear algebra | Keywords: | |
Cc: | kini, kcrisman | Merged in: | |
Authors: | Robert Bradshaw | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
E.g.
sage: [1,2;3,4] [1 2] [3 4] sage: [1,2;3,4].parent() Full MatrixSpace of 2 by 2 dense matrices over Integer Ring sage: [1, 2; 3, 1/2].parent() Full MatrixSpace of 2 by 2 dense matrices over Rational Field sage: [1, 2; 3, pi].parent() Full MatrixSpace of 2 by 2 dense matrices over Symbolic Ring
Attachments (1)
Change History (10)
Changed 11 years ago by
Attachment: | preparse_matrix.patch added |
---|
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
See #11699 for another take on using this syntax in the regular matrix constructor.
comment:3 Changed 11 years ago by
Cc: | kini added |
---|
comment:4 Changed 10 years ago by
Cc: | kcrisman added |
---|
comment:5 Changed 9 years ago by
Milestone: | sage-5.11 → sage-5.12 |
---|
comment:6 Changed 9 years ago by
Milestone: | sage-6.1 → sage-6.2 |
---|
comment:7 Changed 9 years ago by
Milestone: | sage-6.2 → sage-6.3 |
---|
comment:8 Changed 8 years ago by
Milestone: | sage-6.3 → sage-6.4 |
---|
comment:9 Changed 5 weeks ago by
Milestone: | sage-6.4 |
---|
Note: See
TracTickets for help on using
tickets.
Of course, a big change like this should at least have a vote and discussion on sage-devel.
Rob Beezer points out the preparser doesn't deal so well with newlines, so this patch breaks this valid python syntax:
and it never quits.