Fixed. Patch at http://sage.math.washington.edu/home/dmharvey/patches/ alternating_group.hg
david On May 30, 2007, at 9:34 PM, David Harvey wrote: > > > On May 30, 2007, at 9:30 PM, Green Kobold wrote: > >> >> in the middle of a code (600 lines), i use a AlternatingGroup and get >> always the same error: >> >> Traceback (most recent call last): >> File "../../python/dev/wx-dev/granulador8.py", line 496, in MkSnd >> MakeGrains(self.name) >> File "../../python/dev/wx-dev/granulador8.py", line 335, in >> __init__ >> AlternatingGroup(4) >> File "/home/ref/Desktop/packages/sage/local/lib/python2.5/site- >> packages/sage/groups/perm_gps/permgroup.py", >> line 1064, in __init__ >> raise ValueError, "n (=%s) must be an integer >= 1 or a list"%n >> ValueError: n (=4) must be an integer >= 1 or a list >> >> what is very strange is that I use CyclicPermutationGroup and >> SymmetricGroup and DihedralGroup with no problems. There is no other >> AlternatingGroup in the script. And the error is there for simple >> inputs such as AlternatingGroup(2). >> I changed 'from sage.all import *', to 'import sage.all as S' and >> imported sage.all close to the AlternatingGroup statement. No >> improve. >> Is that a bug? Is there any ideas to work it out? > > For some strange reason the AlternatingGroup constructor requires a > SAGE integer, not a python integer. > > If you call AlternatingGroup(4) from the SAGE prompt, it will work, > because the preparser converts 4 into Integer(4). But in a python > script it won't work. > > As a temporary workaround you can call AlternatingGroup(Integer(4)) > directly. > > I will look into this further. > > david --~--~---------~--~----~------------~-------~--~----~ 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 URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---
