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

swap_row does not work on modular matrices #8264

Closed
sagetrac-janwil123 mannequin opened this issue Feb 14, 2010 · 5 comments
Closed

swap_row does not work on modular matrices #8264

sagetrac-janwil123 mannequin opened this issue Feb 14, 2010 · 5 comments

Comments

@sagetrac-janwil123
Copy link
Mannequin

sagetrac-janwil123 mannequin commented Feb 14, 2010

For some reason, swap_row does not work if the elements of the matrix are treated as integers modulo something. The code to reproduce the bug is the following:

A = matrix(ZZ, 2,[1,2,3,4])
B = copy(A)
B.swap_rows(0,1)
print B,'\n'
B.swap_columns(0,1) # So far so good
print B,'\n'
C = A.apply_map(lambda x:mod(x,8))
C.swap_rows(0,1) # This line does not work
print C,'\n'
C.swap_columns(0,1) # But this one does
print C

The bug reproduces every time on Mac OSX 10.6, SAGE version 4.3.1.

Component: linear algebra

Author: Mike Hansen

Reviewer: Nicolas Borie

Merged: sage-4.3.4.alpha1

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

@mwhansen
Copy link
Contributor

mwhansen commented Mar 5, 2010

comment:1

Attachment: trac_8264.patch.gz

@mwhansen
Copy link
Contributor

mwhansen commented Mar 5, 2010

Author: Mike Hansen

@sagetrac-nborie
Copy link
Mannequin

sagetrac-nborie mannequin commented Mar 6, 2010

comment:2

The patch fix the ticket and add the good test.

Positive review from me.

@sagetrac-nborie
Copy link
Mannequin

sagetrac-nborie mannequin commented Mar 6, 2010

Reviewer: Nicolas Borie

@mwhansen
Copy link
Contributor

mwhansen commented Mar 6, 2010

Merged: sage-4.3.4.alpha1

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

2 participants