On Jan 7, 3:38 pm, davidp <dav...@reed.edu> wrote:
Hi Dave,
> Oops. I take back my last post. Running Sage 3.2.2, I got the
> following:
>
> sage: combinations([1,2,3,4],2)
> ------------------------------------------------------------
> File "<string>", line 1
> [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 2, 3 ], [ 2, 4 ], [ 3, 4 ] ]
> gap>
I tried in Sage 3.2, 3.2.1, 3.2.2 and 3.2.3 and it always worked for
me.
^
> SyntaxError: invalid syntax
>
> The problem seems to occur on line 1580 of combinat.py:
>
> 1579 ans=gap.eval("Combinations(%s,%s)"%(mset,ZZ(k))).replace
> ("\n","")
> 1580 return eval(ans)
>
> For the example above:
>
> sage: gap.eval("Combinations([1,2,3,4],2)")
> '[ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 2, 3 ], [ 2, 4 ], [ 3, 4 ] ]\n\x1b
> [1m\x1b[34mgap> \x1b[0m'
> sage: eval(gap.eval("Combinations([1,2,3,4],2)").replace("\n",""))
> ------------------------------------------------------------
> File "<string>", line 1
> [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 2, 3 ], [ 2, 4 ], [ 3, 4 ] ]
> gap>
> ^
> SyntaxError: invalid syntax
>
> sage: eval(gap.eval("Combinations([1,2,3,4],2)").replace("\n",""))
> ------------------------------------------------------------
> File "<string>", line 1
> [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 2, 3 ], [ 2, 4 ], [ 3, 4 ] ]
> gap>
> ^
> SyntaxError: invalid syntax
>
> Thanks for any suggestions.
Hmm, this looks like some escape characters from the shell. What shell
are you using? . What platform is this on? Did you build this Sage
yourself or is it a binary? Did you upgrade it from a previous release
of Sage?
Do you have any gap config file around? This problem sounds familiar,
but I cannot put my finger on it.
> Dave
One last think: Do you have a patch for the laplacian_matrix()
problem, i.e. http://trac.sagemath.org/sage_trac/ticket/4888 or do you
want someone from our end to make a patch? Robert Miller looked at the
suggested fix and he agrees that it is the right way to go.
Cheers,
Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---