Opened 2 years ago

Closed 19 months ago

#22073 closed defect (fixed)

Surprising matrix solve error message

Reported by: rws Owned by:
Priority: major Milestone: sage-8.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) 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 19 months ago by alina

  • Branch set to u/alina/surprising_matrix_solve_error_message

comment:2 Changed 19 months ago by alina

  • Authors set to Alina, Renata
  • Commit set to fa579ae58ed1005a45fc8105e81f4082bc3cae3b
  • Status changed from new to needs_review

New commits:

fa579aefixed the error message for solve_left() when the number of columns is not the same on LHS and RHS

comment:3 Changed 19 months ago by aly.deines

  • Keywords sd90 added

comment:4 Changed 19 months ago by clienkaemper

  • Authors Alina, Renata deleted
  • Keywords sd90 removed
  • Reviewers set to Caitlin Lienkaemper
  • Status changed from needs_review to positive_review

comment:5 Changed 19 months ago by tscrim

  • Milestone changed from sage-7.5 to sage-8.1
  • Status changed from positive_review to 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 19 months ago by tscrim (previous) (diff)

comment:6 Changed 19 months ago by clienkaemper

  • Authors set to Alina Bucur, Renata Paramastri

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

Last edited 19 months ago by clienkaemper (previous) (diff)

comment:7 Changed 19 months ago by kedlaya

For the record, all doctests pass on k8s.

comment:8 Changed 19 months ago by git

  • Commit changed from fa579ae58ed1005a45fc8105e81f4082bc3cae3b to 358f873e6a40a2a8a03bc104273f4d4e21bf9f7a

Branch pushed to git repo; I updated commit sha1. New commits:

358f873removed trailing white spaces and long sentence

comment:9 Changed 19 months ago by alina

  • Status changed from needs_work to needs_review

Removed the long sentence completely as tscrim suggested and got rid of the trailing white spaces.

comment:10 Changed 19 months ago by kedlaya

  • Reviewers changed from Caitlin Lienkaemper to Kiran Kedlaya, Caitlin Lienkaemper, Travis Scrimshaw
  • Status changed from needs_review to positive_review

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

comment:11 Changed 19 months ago by vbraun

  • Branch changed from u/alina/surprising_matrix_solve_error_message to 358f873e6a40a2a8a03bc104273f4d4e21bf9f7a
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.