Opened 12 years ago
Closed 12 years ago
#5714 closed defect (duplicate)
Mod-2 matrix output does not show subdivisions
Reported by: | justin | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | algebra | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
This was reported on sage-support. The following shows what's going on:
sage: MS7=MatrixSpace(Integers(7),4,4) sage: M=MS7.random_element() sage: M.subdivide([2],[2]) sage: M [6 1|3 4] [4 4|0 5] [---+---] [4 2|2 6] [5 6|3 3] sage: MS2=MatrixSpace(Integers(2),4,4) sage: N=MS2.random_element() sage: N.subdivide([2],[2]) sage: N [1 0 1 0] [1 1 0 0] [1 1 1 0] [0 0 0 1]
See also #5716 for another issue and #5717 for another example. #5715 is a duplicate of this ticket.
Change History (4)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
- Description modified (diff)
comment:3 Changed 12 years ago by
- Description modified (diff)
comment:4 Changed 12 years ago by
- Resolution set to duplicate
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
As I mentioned on the list, the Matrix_mod2_dense class has its own str() method that just returns a string representation of the matrix without taking subdivisions into account.
Removing that method seems to be benign, and lets the common print method for matrices take over, printing with subdivisions.
I have doctested the matrix directory without a problem. Someone involved in the initial implementations might want to comment.
I'll attach a patch when the testing is complete (or try again if testing fails).