Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matrix: M[range(2,-1,-1),:] returns junk #2871

Closed
dfdeshom opened this issue Apr 10, 2008 · 4 comments
Closed

matrix: M[range(2,-1,-1),:] returns junk #2871

dfdeshom opened this issue Apr 10, 2008 · 4 comments

Comments

@dfdeshom
Copy link

In the following example, A should be "upside down", but it's not

sage: A = random_matrix(ZZ,3); A

[ 1  3 -1]
[ 4 -3 -1]
[-1  0 -1]

sage: A[range(2,-1,-1),:]

[ 1  3 -1]
[ 4 -3 -1]
[-1  0 -1]

The problem is with set(), which doesn't preserve order.

Component: linear algebra

Issue created by migration from https://trac.sagemath.org/ticket/2871

@dfdeshom dfdeshom added this to the sage-3.0 milestone Apr 10, 2008
@dfdeshom dfdeshom self-assigned this Apr 10, 2008
@sagetrac-cwitty
Copy link
Mannequin

sagetrac-cwitty mannequin commented Apr 12, 2008

comment:2

Attachment: 2871.patch.gz

The code and doctests look good, and doctests pass in sage/matrix in Sage 2.11. Unfortunately, applying the patch to Sage 3.0 alpha 2 (the latest I have at the moment) gives a rejected hunk.

@sagetrac-cwitty sagetrac-cwitty mannequin changed the title matrix: M[range(2,-1,-1),:] returns junk [positive review pending rebase] matrix: M[range(2,-1,-1),:] returns junk Apr 12, 2008
@dfdeshom
Copy link
Author

patch against alpha2

@sagetrac-cwitty
Copy link
Mannequin

sagetrac-cwitty mannequin commented Apr 12, 2008

comment:3

Attachment: 2871-alpha2.patch.gz

With the revised 2871-alpha2.patch, the patch applies and doctests pass in sage/matrix for sage 3.0 alpha2.

Didier, thanks for making the changes I requested on IRC!

Looks good, please apply.

@sagetrac-cwitty sagetrac-cwitty mannequin changed the title [positive review pending rebase] matrix: M[range(2,-1,-1),:] returns junk matrix: M[range(2,-1,-1),:] returns junk Apr 12, 2008
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Apr 12, 2008

comment:4

Merged 2871-alpha2.patch in Sage 3.0.alpha4

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Apr 12, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant