#16633: indefinite factorization changes an immutable matrix
------------------------------+-----------------------------------
Reporter: tscrim | Owner: tscrim
Type: defect | Status: new
Priority: major | Milestone: sage-6.3
Component: linear algebra | Keywords: matrix mutation
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------------+-----------------------------------
In 6.3.beta5 we have
{{{
sage: A = matrix(QQ, [[ 4, -2, 4, 2],
....: [-2, 10, -2, -7],
....: [ 4, -2, 8, 4],
....: [ 2, -7, 4, 7]])
sage: A.indefinite_factorization()
(
[ 1 0 0 0]
[-1/2 1 0 0]
[ 1 0 1 0]
[ 1/2 -2/3 1/2 1], (4, 9, 4, 1)
)
sage: A
[ 4 -2 4 2]
[-2 10 -2 -7]
[ 4 -2 8 4]
[ 2 -7 4 7]
sage: B = matrix(QQ, [[ 4, -2, 4, 2],
....: [-2, 10, -2, -7],
....: [ 4, -2, 8, 4],
....: [ 2, -7, 4, 7]])
sage: B.set_immutable()
sage: B.indefinite_factorization()
(
[ 1 0 0 0]
[-1/2 1 0 0]
[ 1 0 1 0]
[ 1/2 -2/3 1/2 1], (4, 9, 4, 1)
)
sage: B
[ 1 0 0 0]
[-1/2 1 0 0]
[ 1 0 1 0]
[ 1/2 -2/3 1/2 1]
}}}
Actually the problem stems from the output of `change_ring()`:
{{{
sage: A.change_ring(QQ) is A
False
sage: B.change_ring(QQ) is B
True
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/16633>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.