Hi all. The following (minor) issue has been bothering me a little bit
for a while.
Currently if I write lcm([1,2,3]), I get six, but lcm( (1,2,3) ) gives
an error. (And similarly for gcd.) This is because the lcm and gcd
functions (these are in rings/arith.py) contain code like the following:
if isinstance(a, list):
return __LCM_list(a)
I just changed all occurrences of the first of these lines in the lcm
and gcd functions in my own installation to read
if isinstance(a,list) or isinstance(a,tuple):
and now I can find the lcm or gcd of a tuple just fine.
Is there any reason I shouldn't do this? If not, I guess that this is a
bug report/fix. (Also, I feel that, ideally, lcm/gcd ought to be able to
handle something like an xrange object, or, in general, any
iterator/generator. But that is another issue.)
--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---