Hi, Here's the patch I posted for the linear algebra problem. I think the issue is definitely subtler than Robert Bradshaw's patch suggests. See below.
-- William ---------- Forwarded message ---------- From: William Stein <[EMAIL PROTECTED]> Date: Jun 6, 2007 6:55 PM Subject: Re: [sage-support] ring conversion error To: [EMAIL PROTECTED] On 6/6/07, Thea Gegenberg <[EMAIL PROTECTED]> wrote: > If I am working with matrices over integers mod something then we I > try to multiply a row by some number I get an error for moduli between > 46341 and 18446744073709551614. > > Here is an example of what I am doing: > sage: D=46341 > sage: u=7 > sage: R=Integers(D) > sage: p=matrix(R,[[84, 97, 55, 58, 51]]) > sage: R(u)*p.row(0) > > The error I get is "TypeError: Cannot convert > sage.rings.integer_mod.IntegerMod_int64 to > sage.rings.integer_mod.IntegerMod_int". (1) As a hack, you could make your matrix sparse, so a different data type is used, and the error will go away: p=matrix(R,[[84, 97, 55, 58, 51]], sparse=True) This will -- of course -- be slower. (2) Or -- you could apply the attached patch with hg_sage.import_patch('4878.patch') -- William -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
4878.patch
Description: Binary data