There's a bug in assigning 1 x 1 submatrices. assigning any
submatrices with dimensions bigger than 1 seems to work as expected:
sage: A = matrix(GF(2),100,100)
sage: C1 = matrix(GF(2),[[1]])
sage: C2 = matrix(GF(2),[[0,1],[1,0]])
sage: A[88:90,88:90] = C2 # this is ok however
sage: A[90:91,90:91] = C1
TypeError: unable to coerce <type
'sage.matrix.matrix_integer_dense.Matrix_integer_dense'> to an
integer
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_5.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding:
utf-8 -*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("QVs5MDo5MSw5MDo5MV0gPSBDMQ=="),globals())
+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpo1FHLb/___code___.py", line 3, in <module>
exec
compile(u'A[_sage_const_90 :_sage_const_91 ,_sage_const_90 :_sage_const_91 ]
= C1
File "", line 1, in <module>
File "matrix0.pyx", line 1367, in
sage.matrix.matrix0.Matrix.__setitem__ (sage/matrix/matrix0.c:5964)
File "matrix0.pyx", line 1472, in
sage.matrix.matrix0.Matrix._coerce_element (sage/matrix/matrix0.c:
7082)
File "/usr/local/sage2/local/lib/python2.6/site-packages/sage/rings/
finite_rings/integer_mod_ring.py", line 763, in __call__
return integer_mod.IntegerMod(self, x)
File "integer_mod.pyx", line 167, in
sage.rings.finite_rings.integer_mod.IntegerMod (sage/rings/
finite_rings/integer_mod.c:2951)
File "integer_mod.pyx", line 1672, in
sage.rings.finite_rings.integer_mod.IntegerMod_int.__init__ (sage/
rings/finite_rings/integer_mod.c:14001)
File "parent.pyx", line 859, in
sage.structure.parent.Parent.__call__ (sage/structure/parent.c:6407)
File "coerce_maps.pyx", line 82, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/
structure/coerce_maps.c:3108)
File "coerce_maps.pyx", line 77, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/
structure/coerce_maps.c:3010)
File "integer.pyx", line 644, in sage.rings.integer.Integer.__init__
(sage/rings/integer.c:6714)
File "parent.pyx", line 859, in
sage.structure.parent.Parent.__call__ (sage/structure/parent.c:6407)
File "coerce_maps.pyx", line 82, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/
structure/coerce_maps.c:3108)
File "coerce_maps.pyx", line 77, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/
structure/coerce_maps.c:3010)
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org