Opened 13 years ago
Closed 13 years ago
#8264 closed defect (fixed)
swap_row does not work on modular matrices
Reported by: | Jan Willemson | Owned by: | William Stein |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | linear algebra | Keywords: | |
Cc: | Merged in: | sage-4.3.4.alpha1 | |
Authors: | Mike Hansen | Reviewers: | Nicolas Borie |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
For some reason, swap_row does not work if the elements of the matrix are treated as integers modulo something. The code to reproduce the bug is the following:
A = matrix(ZZ, 2,[1,2,3,4]) B = copy(A) B.swap_rows(0,1) print B,'\n' B.swap_columns(0,1) # So far so good print B,'\n' C = A.apply_map(lambda x:mod(x,8)) C.swap_rows(0,1) # This line does not work print C,'\n' C.swap_columns(0,1) # But this one does print C
The bug reproduces every time on Mac OSX 10.6, SAGE version 4.3.1.
Attachments (1)
Change History (4)
Changed 13 years ago by
Attachment: | trac_8264.patch added |
---|
comment:1 Changed 13 years ago by
Authors: | → Mike Hansen |
---|---|
Status: | new → needs_review |
comment:2 Changed 13 years ago by
Reviewers: | → Nicolas Borie |
---|---|
Status: | needs_review → positive_review |
comment:3 Changed 13 years ago by
Merged in: | → sage-4.3.4.alpha1 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Note: See
TracTickets for help on using
tickets.
The patch fix the ticket and add the good test.
Positive review from me.