| 1 | initial version |
I think the problem might be that
cdef Integer z
is part of the code here, and then there is no coercion to the integers, it's just assumed that it is one. Trying
z = Integer(row[k])
seems to fix it, though this is probably inelegant and inefficient.
Here is a minimal example inside Sage itself, for reference.
sage: m = matrix([[int(1),int(1)],[int(1),int(1)]])
sage: m.insert_row(1,[int(1),int(1)])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.