Opened 8 years ago
Closed 8 years ago
#14049 closed defect (fixed)
Matrix slices don't deal with zero rows or columns well
Reported by: | jason | Owned by: | jason, was |
---|---|---|---|
Priority: | major | Milestone: | sage-5.7 |
Component: | linear algebra | Keywords: | |
Cc: | jhpalmieri, rbeezer | Merged in: | sage-5.7.beta3 |
Authors: | Jason Grout | Reviewers: | Karl-Dieter Crisman |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
As reported on ask.sagemath: http://ask.sagemath.org/question/2207/empty-matrix, matrix slices don't correctly handle empty matrices. This patch corrects the faulty optimization.
Attachments (1)
Change History (7)
Changed 8 years ago by
comment:1 Changed 8 years ago by
- Cc jhpalmieri rbeezer added
- Status changed from new to needs_review
comment:2 Changed 8 years ago by
- Reviewers set to Karl-Dieter Crisman
- Status changed from needs_review to positive_review
comment:3 Changed 8 years ago by
We should certainly have zero-row and zero-column matrices. That's an explicitly and deliberately supported feature in Sage.
comment:4 Changed 8 years ago by
I think kcrisman's question is whether a 0x4 matrix should be displayed differently, somehow, than a 0x0 matrix. I'm not sure what the answer is, and it's low priority, but it's an interesting question.
comment:5 Changed 8 years ago by
I suppose I was asking both questions, but I'll take the experts' answers on both.
comment:6 Changed 8 years ago by
- Merged in set to sage-5.7.beta3
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
This looks good, passes tests etc. - yes, talk about premature optimization!
My dumb question is whether we should, in fact, have such nonsensical matrices. In particular
Should we instead have something that shows we have four columns? But of course that wouldn't be about this ticket.