Opened 6 years ago
Closed 5 years ago
#22073 closed defect (fixed)
Surprising matrix solve error message
Reported by:  Ralf Stephan  Owned by:  

Priority:  major  Milestone:  sage8.1 
Component:  linear algebra  Keywords:  
Cc:  Merged in:  
Authors:  Alina Bucur, Renata Paramastri  Reviewers:  Kiran Kedlaya, Caitlin Lienkaemper, Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  358f873 (Commits, GitHub, GitLab)  Commit:  358f873e6a40a2a8a03bc104273f4d4e21bf9f7a 
Dependencies:  Stopgaps: 
Description
This cannot be right, can it?
sage: M = matrix([(3,1,0,0),(1,1,2,0),(0,0,0,3)]) sage: B = matrix(QQ,3,1, [0,0,1]) sage: M.rows() [(3, 1, 0, 0), (1, 1, 2, 0), (0, 0, 0, 3)] sage: B.rows() [(0), (0), (1)] sage: M.nrows() 3 sage: B.nrows() 3 sage: M.solve_left(B) ... ValueError: number of rows of self must equal number of rows of B
Change History (11)
comment:1 Changed 5 years ago by
Branch:  → u/alina/surprising_matrix_solve_error_message 

comment:2 Changed 5 years ago by
Authors:  → Alina, Renata 

Commit:  → fa579ae58ed1005a45fc8105e81f4082bc3cae3b 
Status:  new → needs_review 
comment:3 Changed 5 years ago by
Keywords:  sd90 added 

comment:4 Changed 5 years ago by
Authors:  Alina, Renata 

Keywords:  sd90 removed 
Reviewers:  → Caitlin Lienkaemper 
Status:  needs_review → positive_review 
comment:5 Changed 5 years ago by
Milestone:  sage7.5 → sage8.1 

Status:  positive_review → needs_work 
The author name is now missing (should be in "First Last" format). Also, remove all of your (added) trailing whitespace and break this long line into <80 characters long:
If the number of columns on the left and right hand sides is different it raises the error message 'number of columns of self must equal number of columns of B'
Actually, I would just remove that line altogether as it doesn't add anything practical to the documentation and you have the examples.
comment:6 Changed 5 years ago by
Authors:  → Alina Bucur, Renata Paramastri 

put author info that I accidentally deleted back, now w/ last names
comment:8 Changed 5 years ago by
Commit:  fa579ae58ed1005a45fc8105e81f4082bc3cae3b → 358f873e6a40a2a8a03bc104273f4d4e21bf9f7a 

Branch pushed to git repo; I updated commit sha1. New commits:
358f873  removed trailing white spaces and long sentence

comment:9 Changed 5 years ago by
Status:  needs_work → needs_review 

Removed the long sentence completely as tscrim suggested and got rid of the trailing white spaces.
comment:10 Changed 5 years ago by
Reviewers:  Caitlin Lienkaemper → Kiran Kedlaya, Caitlin Lienkaemper, Travis Scrimshaw 

Status:  needs_review → positive_review 
Looks good now (and all tests still pass). Positive review.
comment:11 Changed 5 years ago by
Branch:  u/alina/surprising_matrix_solve_error_message → 358f873e6a40a2a8a03bc104273f4d4e21bf9f7a 

Resolution:  → fixed 
Status:  positive_review → closed 
New commits:
fixed the error message for solve_left() when the number of columns is not the same on LHS and RHS