Opened 13 years ago
Closed 12 years ago
#61 closed enhancement (fixed)
[with patch] hanke -- disturbing matrix constructor issue involving rows versus columns
Reported by: | was | Owned by: | mhansen |
---|---|---|---|
Priority: | minor | Milestone: | sage-2.8.12 |
Component: | basic arithmetic | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Hi William, I just found a disturbing trait about Matrix constructions, and was wondering if you could include a rows/columns flag to address it.
When a matrix is constructed from tuples, it assumes that you want to use these numbers as *rows*, regardless of whether the tuples are appropriately sized. Since there is no way of deciding which is meant for square matrices, it seems reasonable to add an extra (mandatory) flag to the constructor for a list of tuples to ask which is meant.
I hope your semster is going well. See you,
-Jon (Hanke)
-------------------------------------------------------------------- sage: M2 = MatrixSpace(ZZ,2,4)(range(8)); M2 [0 1 2 3] [4 5 6 7] sage: M2.columns() [(0, 4), (1, 5), (2, 6), (3, 7)] sage: MatrixSpace(ZZ,2,4)(M2.columns()) [0 4 1 5] [2 6 3 7] sage: M2 == MatrixSpace(ZZ,2,4)(M2.columns()) False sage: M2 == MatrixSpace(ZZ,2,4)(M2.rows()) True
Attachments (2)
Change History (7)
comment:1 Changed 12 years ago by
- Milestone set to sage-2.9
comment:2 Changed 12 years ago by
- Owner changed from somebody to mhansen
comment:3 Changed 12 years ago by
- Milestone changed from sage-2.9.1 to sage-2.8.12
comment:4 Changed 12 years ago by
- Status changed from new to assigned
- Summary changed from hanke -- disturbing matrix constructor issue involving rows versus columns to [with patch] hanke -- disturbing matrix constructor issue involving rows versus columns
Changed 12 years ago by
Changed 12 years ago by
comment:5 Changed 12 years ago by
- Resolution set to fixed
- Status changed from assigned to closed
This is still a problem with Sage 2.8.2. The 2.8.3 release might cut it a little close because there are still a large number of tickets left (to be fixed in roughly 1 day).
Cheers,
Michael