Hi:
Either a bug in combinat.py's permutations, or an indication that
it needs to be rewritten. (permutations is a GAP wrapper which
I might have written, so should probably fix ...)
- David Joyner
sage: MS = MatrixSpace(QQ,2,2)
sage: A = MS([1,2,3,4])
sage: permutations(A.rows())
[[(3, 4), (1, 2)], [(1, 2), (3, 4)]]
sage:
sage: MS = MatrixSpace(GF(2),2,2)
sage: A = MS([1,2,3,4])
sage: permutations(A.rows())
---------------------------------------------------------------------------
<type 'exceptions.RuntimeError'> Traceback (most recent call last)
/Users/wdj/sagefiles/sage-2.8.2/<ipython console> in <module>()
/Users/wdj/sagefiles/sage-2.8.2/local/lib/python2.5/site-packages/sage/combinat/combinat.py
in permutations(mset)
1552
1553 """
-> 1554 ans=gap.eval("PermutationsList(%s)"%mset)
1555 return eval(ans)
1556
/Users/wdj/sagefiles/sage-2.8.2/local/lib/python2.5/site-packages/sage/interfaces/gap.py
in eval(self, x, newlines, strip)
301 if len(x) == 0 or x[len(x) - 1] != ';':
302 x += ';'
--> 303 s = Expect.eval(self, x)
304 if newlines:
305 return s
/Users/wdj/sagefiles/sage-2.8.2/local/lib/python2.5/site-packages/sage/interfaces/expect.py
in eval(self, code, strip, **kwds)
648 code = code.strip()
649 try:
--> 650 return '\n'.join([self._eval_line(L, **kwds) for L
in code.split('\n') if L != ''])
651 except KeyboardInterrupt:
652 # DO NOT CATCH KeyboardInterrupt, as it is being caught
/Users/wdj/sagefiles/sage-2.8.2/local/lib/python2.5/site-packages/sage/interfaces/gap.py
in _eval_line(self, line, allow_use_file, wait_for_prompt)
502 return ''
503 else:
--> 504 raise RuntimeError, message
505
506 except KeyboardInterrupt:
<type 'exceptions.RuntimeError'>: Gap produced error output
Permutation: <expr> must be a positive integer (not a integer)
executing PermutationsList([(1, 0), (1, 0)]);
--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---