Opened 6 years ago

Closed 5 years ago

# Surprising matrix solve error message

Reported by: Owned by: Ralf Stephan major sage-8.1 linear algebra Alina Bucur, Renata Paramastri Kiran Kedlaya, Caitlin Lienkaemper, Travis Scrimshaw N/A 358f873 358f873e6a40a2a8a03bc104273f4d4e21bf9f7a

### 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
```

### comment:1 Changed 5 years ago by Alina Bucur

Branch: → u/alina/surprising_matrix_solve_error_message

### comment:2 Changed 5 years ago by Alina Bucur

Authors: → Alina, Renata → fa579ae58ed1005a45fc8105e81f4082bc3cae3b new → needs_review

New commits:

 ​fa579ae `fixed the error message for solve_left() when the number of columns is not the same on LHS and RHS`

### comment:4 Changed 5 years ago by Caitlin Lienkaemper

Authors: Alina, Renata sd90 removed → Caitlin Lienkaemper needs_review → positive_review

### comment:5 Changed 5 years ago by Travis Scrimshaw

Milestone: sage-7.5 → sage-8.1 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.

Last edited 5 years ago by Travis Scrimshaw (previous) (diff)

### comment:6 Changed 5 years ago by Caitlin Lienkaemper

Authors: → Alina Bucur, Renata Paramastri

put author info that I accidentally deleted back, now w/ last names

Last edited 5 years ago by Caitlin Lienkaemper (previous) (diff)

### comment:7 Changed 5 years ago by Kiran Kedlaya

For the record, all doctests pass on k8s.

### comment:8 Changed 5 years ago by git

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 Alina Bucur

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 Kiran Kedlaya

Reviewers: Caitlin Lienkaemper → Kiran Kedlaya, Caitlin Lienkaemper, Travis Scrimshaw needs_review → positive_review

Looks good now (and all tests still pass). Positive review.

### comment:11 Changed 5 years ago by Volker Braun

Branch: u/alina/surprising_matrix_solve_error_message → 358f873e6a40a2a8a03bc104273f4d4e21bf9f7a → fixed positive_review → closed
Note: See TracTickets for help on using tickets.