The following worked for me:

1. download the patch
2. run

   $ sage -dev import-patch --local=/tmp/12051_LLL_QQ.patch

where "/tmp/12051_LLL_QQ.patch" has to be replaced with the name of
the file you just downloaded.

And then, after

    $ sage -b

you can do in a Sage console

sage: m = matrix(QQ, [[1/2,3],[7,2/5]])
sage: m.LLL()
[  1/2     3]
[ 13/2 -13/5]

Vincent

On 21/03/2015, [email protected] <[email protected]> wrote:
> Thank you for your answer. The thing is that I have some old sage's code
> that uses this patch and seem useless in the recent version of sage.
> Your idea is not bad, about adding this function in the source code and
> patch sage,  but not easy for me do it. Maybe I try it.
> Some "simple" things in sage, sometimes are too complicated for simple
> users.
> Costas
>
>
> On Saturday, March 21, 2015 at 6:02:39 PM UTC+2, John Cremona wrote:
>>
>> The patch on that ticket was written in 2011 so there is little hope
>> that it will apply to the most recent version of Sage.  Also, it is
>> old enough that it predates Sage's current git-based revision system
>> so would need to be applied manually anyway.
>>
>> The patch on that ticket was never reviewed (or ever set to "needs
>> review", it seems).  But since all it does is to add one function to
>> one class, it should be hard to add the function yourself.  This would
>> be a good way into Sage development, if you have not done any before,
>> especially since you clearly have some motivation for it!
>>
>> If you are going to patch a local version of Sage then you will need
>> to make your own clone of the full source distribution first -- see
>> the developers' manual.  I note that you were trying to use "sudo",
>> but note that you should never build or run Sage as root.  Build it in
>> your own directory.
>>
>> John Cremona
>>
>> On 21 March 2015 at 15:54,  <[email protected] <javascript:>> wrote:
>> > I have the most recent version of sage. I want to ask
>> > how to add the patch for the ticket
>> http://trac.sagemath.org/ticket/12051.
>> > I tried $sudo ./sage --dev import-patch --url
>> > http://trac.sagemath.org/attachment/ticket/12051/12051_LLL_QQ.patch
>> > but it failed to added.
>> > I am sure that to previous versions (I don't remember exactly the
>> versions!)
>> > of sage it worked.
>> > Also, why this patch did not applied to the recent versions of sage?
>> > It would be nice to have LLL for rational (not integers) matrices.
>> > thank you
>> > Costas
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "sage-support" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an
>> > email to [email protected] <javascript:>.
>> > To post to this group, send email to [email protected]
>> <javascript:>.
>> > Visit this group at http://groups.google.com/group/sage-support.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" 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-support.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" 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-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to