[sage-support] bug with sums of matrices
hi there, i thought i'd report this bug, even though it's hard to reproduce and not well-identified. I have a ring R of type: Fraction Field of Multivariate Polynomial Ring in x0, x1, x2, x3, x4, x0_iv, x1_iv, x2_iv, x3_iv, x4_iv over Cyclotomic Field of order 4 and degree 2 (the _iv variables will play no role in the sequel -- not that it matters.) And I have a list L of 64 matrices in MatrixSpace(R, 2). When i try sum(L), I get: /home/pedro/Bureau/sage-3.0.2-ubuntu32-intel-i686-Linux/local/lib/ python2.5/site-packages/sage/rings/fraction_field_element.py in _add_(self, right) 298 numer = numer // new_gcd 299 denom = denom // new_gcd -- 300 return FractionFieldElement(self.parent(), numer, denom, coerce=False, reduce=False) 301 # else: no reduction necessary 302 except AttributeError: # missing gcd or quo_rem, don't reduce /home/pedro/Bureau/sage-3.0.2-ubuntu32-intel-i686-Linux/local/lib/ python2.5/site-packages/sage/rings/fraction_field_element.py in __init__(self, parent, numerator, denominator, coerce, reduce) 65 pass 66 if self.__denominator.is_zero(): --- 67 raise ZeroDivisionError, fraction field element division by zero 68 69 def reduce(self): ZeroDivisionError: fraction field element division by zero (This is sage 3.1.1 despite the folder name.) If i try to do a for loop and sum the matrices one by one, i realize that the problem is with the addition of sum(L[:49]) (call it M) and L[49] (call it N). I can compute them separately and get the same error message by trying M+N. Of course you'd like to see M and N. Well be ready for a disappointment: M is [ ((37/32*I - 5/16)*x0^2*x1*x2*x3 + (-5/64*I + 7/32)*x1*x2^2*x3^2 + (-19/32*I + 7/16)*x0^2*x1*x2*x4 + (-9/32*I - 1/16)*x0^2*x1*x3*x4 + (-5/32*I + 13/16)*x0^2*x2*x3*x4 + (-19/8*I - 89/16)*x1^2*x2*x3*x4 + (15/32*I - 3/8)*x1*x2^2*x3*x4 + (31/64*I - 27/64)*x2^3*x3*x4 + (-31/32*I + 5/16)*x1*x2*x3^2*x4 + (21/32*I - 13/64)*x2*x3^3*x4 + (-5/16*I + 15/64)*x1*x2^2*x4^2 + (-3/32*I + 1/4)*x1*x2*x3*x4^2 + (-7/64*I + 3/64)*x1*x3^2*x4^2 + (13/64*I + 5/8)*x2*x3*x4^3)/ (x1*x2*x3*x4) ((5/32*I - 11/32)*x0^2*x1*x2*x3 + (1/8*I - 1/4)*x1*x2^2*x3^2 + (7/32*I + 15/32)*x0^2*x1*x2*x4 + (3/32*I - 1/32)*x0^2*x1*x3*x4 + (9/32*I - 3/32)*x0^2*x2*x3*x4 + (-29/32*I + 303/128)*x1^2*x2*x3*x4 + (5/16*I + 11/16)*x1*x2^2*x3*x4 + (-1/64*I + 29/128)*x2^3*x3*x4 + (11/8*I + 1/8)*x1*x2*x3^2*x4 + (21/64*I - 13/128)*x2*x3^3*x4 + (-17/64*I - 7/32)*x1*x2^2*x4^2 + (-7/8*I + 7/8)*x1*x2*x3*x4^2 + (-9/64*I - 7/64)*x1*x3^2*x4^2 + (5/16*I - 13/128)*x2*x3*x4^3)/(x1*x2*x3*x4)] [((-5/32*I + 11/32)*x0^2*x1*x2*x3 + (-1/8*I + 1/4)*x1*x2^2*x3^2 + (-7/32*I - 15/32)*x0^2*x1*x2*x4 + (-3/32*I + 1/32)*x0^2*x1*x3*x4 + (-9/32*I + 3/32)*x0^2*x2*x3*x4 + (-267/32*I + 161/128)*x1^2*x2*x3*x4 + (-5/16*I + 23/16)*x1*x2^2*x3*x4 + (1/64*I - 29/128)*x2^3*x3*x4 + (-1/8*I + 3/2)*x1*x2*x3^2*x4 + (-21/64*I + 13/128)*x2*x3^3*x4 + (17/64*I + 7/32)*x1*x2^2*x4^2 + (7/8*I + 7/4)*x1*x2*x3*x4^2 + (9/64*I + 7/64)*x1*x3^2*x4^2 + (-5/16*I + 13/128)*x2*x3*x4^3)/(x1*x2*x3*x4) ((47/32*I - 7/8)*x0^2*x1*x2*x3 + (5/64*I + 15/32)*x1*x2^2*x3^2 + (47/32*I + 3/4)*x0^2*x1*x2*x4 + (-15/32*I + 1/2)*x0^2*x1*x3*x4 + (-27/32*I + 1/2)*x0^2*x2*x3*x4 + (41/8*I + 49/16)*x1^2*x2*x3*x4 + (-13/32*I + 1/16)*x1*x2^2*x3*x4 + (-27/64*I - 31/64)*x2^3*x3*x4 + (33/32*I + 13/8)*x1*x2*x3^2*x4 + (21/32*I - 13/64)*x2*x3^3*x4 + (1/8*I - 29/64)*x1*x2^2*x4^2 + (-83/32*I - 15/16)*x1*x2*x3*x4^2 + (-1/64*I - 25/64)*x1*x3^2*x4^2 + (-13/64*I - 5/8)*x2*x3*x4^3)/(x1*x2*x3*x4)] while N is [ 0 ((-5/32*I + 11/32)*x0^2*x1*x2*x3 + (-1/8*I + 1/4)*x1*x2^2*x3^2 + (-7/32*I - 15/32)*x0^2*x1*x2*x4 + (-3/32*I + 1/32)*x0^2*x1*x3*x4 + (-9/32*I + 3/32)*x0^2*x2*x3*x4 + (23/32*I + 129/128)*x1^2*x2*x3*x4 + (1/2*I - 3/16)*x1*x2^2*x3*x4 + (1/64*I - 29/128)*x2^3*x3*x4 + (-3/16*I + 3/8)*x1*x2*x3^2*x4 + (-21/64*I + 13/128)*x2*x3^3*x4 + (17/64*I + 7/32)*x1*x2^2*x4^2 + (1/16*I + 1/4)*x1*x2*x3*x4^2 + (9/64*I + 7/64)*x1*x3^2*x4^2 + (-5/16*I + 13/128)*x2*x3*x4^3)/(x1*x2*x3*x4)] [ ((5/32*I - 11/32)*x0^2*x1*x2*x3 + (1/8*I - 1/4)*x1*x2^2*x3^2 + (7/32*I + 15/32)*x0^2*x1*x2*x4 + (3/32*I - 1/32)*x0^2*x1*x3*x4 + (9/32*I - 3/32)*x0^2*x2*x3*x4 + (-23/32*I - 129/128)*x1^2*x2*x3*x4 + (-1/2*I + 3/16)*x1*x2^2*x3*x4 + (-1/64*I + 29/128)*x2^3*x3*x4 + (3/16*I - 3/8)*x1*x2*x3^2*x4 + (21/64*I - 13/128)*x2*x3^3*x4 + (-17/64*I - 7/32)*x1*x2^2*x4^2 + (-1/16*I - 1/4)*x1*x2*x3*x4^2 +
[sage-support] Re: Functions won't evaluated outside [-1..1] using plot
Thanks, that worked. -- Munthe On Sep 9, 1:27 pm, John Cremona [EMAIL PROTECTED] wrote: You need to set the range in the plot command, not in the show command. This works for me: sage: f = sin(x) sage: plot(f, (-5,+5)) or even sage: p = plot(f,(-5,5)) sage: q = plot(f.diff(),(-5,5)) sage: show(p+q) etc. John Cremona 2008/9/9 Munthe [EMAIL PROTECTED]: Hey, I'm relative new to sage, but intend to use it for math and physics classes instead of mathcad. After upgrading from sage 3.0.6 to 3.1.1, I can't get any functions to plot outside of [-1..1]. For example: sage: f = sin(x) sage: f(0.5) 0.479425538604203 sage: f(5.0) -0.958924274663138 sage: p = plot(f) sage: show(p,xmax=2*pi) Only gives me the graph until x==1, and leaves the rest of the figure blank with only hte axes on. Anybody knows what I'm doing wrong? Is there a way to define which interval a functions get evaluated at? Thanks in advance. Munthe --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Wrong plotting!
On Sep 9, 1:29 am, Jason Merrill [EMAIL PROTECTED] wrote: On Sep 8, 4:12 pm, Sand Wraith [EMAIL PROTECTED] wrote: Hi all! I do not know - it is an bug, or my mistake. I am trying to plot sum of a few same functions: This is my function: B=10*sqrt( pi)/7; b=pi/7; c(f)=B*exp(-(b*f)^2); plot(c(f),(f,-5,5)); in the output i see correct graphic. Then i have define a function to calculate sum: def specsum(x,Fdesc): result=0; for i in range(-2,3): xi=i*Fdesc; result+=c(x-xi); return result; then plotting... p1=plot(specsum(x,5),(x,-2.5,2.5)); show(p1) i see graphic, and i think its wrong, because then x -3..-1 it cross the X-Axis. then i thought that it is wrong axis, ... This graphic is fine. It's just that the horizontal axis is not at y==0, which you can see by reading the values off of the y axis. You can do sage: show(p1,ymin=0) if you want the horizontal axis drawn at y==0. There may be a way to set the position of the axes origin more directly. If not, maybe there should be. Regards, JM Thank you!! --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] sage on eeepc
OK! so ive managed to extract sage onto an SD card (ext2 formatted). when i run sage, i get this: -- | SAGE Version 3.1.1, Release Date: 2008-08-17 | | Type notebook() for the GUI, and license() for information.| -- /usr/bin/env: sage.bin: No such file or directory /home/user/E:/sage/local/bin/sage-sage: line 171: sage-cleaner: command not found /home/user/E:/sage/local/bin/sage-sage: line 218: sage-ipython: command not found any ideas?? Thanks! Jon --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Trace of Hecke Operator with large integer
Hello again, I want to compute the trace of Hecke operator with large integer but always i have the same error message Traceback (click to the left for traceback) ... TypeError: n must be an int For example if i reduce the parameter in the hecke operator (13^8) , i have sage: M1 = ModularSymbols(21,2) T1 = M1.hecke_operator(13^8) trace1=T1.trace() print trace1 evaluate result: 2651076189 but if i increase the parameter (13^9) : sage: M1 = ModularSymbols(21,2) T1 = M1.hecke_operator(13^9) trace1=T1.trace() print trace1 evaluate result: Traceback (most recent call last):print trace1 File /usr/local/sage/local/lib/python2.5/site-packages/sage/modular/ hecke/module.py, line 860, in hecke_operator return self.hecke_algebra().hecke_operator(n) File /usr/local/sage/local/lib/python2.5/site-packages/sage/modular/ hecke/algebra.py, line 186, in hecke_operator T = hecke_operator.HeckeOperator(self, n) File /usr/local/sage/local/lib/python2.5/site-packages/sage/modular/ hecke/hecke_operator.py, line 362, in __init__ raise TypeError, n must be an int TypeError: n must be an int there is any way to go over this? Thank u --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Trace of Hecke Operator with large integer
Dear Raouf, On Sep 10, 10:25 pm, Raouf [EMAIL PROTECTED] wrote: I want to compute the trace of Hecke operator with large integer but always i have the same error message Traceback (click to the left for traceback) ... TypeError: n must be an int snip there is any way to go over this? I just tried your example (in Sage 3.1.1), and there was no problem: sage: M1 = ModularSymbols(21,2) sage: T1 = M1.hecke_operator(13^9) sage: trace1=T1.trace() sage: print trace1 34464553246 So, what version of Sage are you using, and on what kind of machine? Cheers Simon --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sage on eeepc
On Sep 10, 12:20 pm, hypermonkey2 [EMAIL PROTECTED] wrote: Hi, OK! so ive managed to extract sage onto an SD card (ext2 formatted). when i run sage, i get this: -- | SAGE Version 3.1.1, Release Date: 2008-08-17 | | Type notebook() for the GUI, and license() for information. | -- /usr/bin/env: sage.bin: No such file or directory /home/user/E:/sage/local/bin/sage-sage: line 171: sage-cleaner: command not found /home/user/E:/sage/local/bin/sage-sage: line 218: sage-ipython: command not found any ideas?? Did you mount the disk to /home/user/E:? The colon, i.e. : is a path separation character under Linux/Unix, so this cannot work. Moving Sage to some place where the path has no colon should work. Thanks! Jon Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Trace of Hecke Operator with large integer
Hi, even with what will become 3.1.2.rc2 this blows up on a 32 bit build: varro:~/sage-3.1.2.rc1 mabshoff$ ./sage -- | SAGE Version 3.1.2.rc1, Release Date: 2008-09-08 | | Type notebook() for the GUI, and license() for information.| -- sage: M1 = ModularSymbols(21,2) sage: T1 = M1.hecke_operator(13^8) sage: trace1=T1.trace() sage: print trace1 2651076189 sage: M1 = ModularSymbols(21,2) sage: T1 = M1.hecke_operator(13^9) --- TypeError Traceback (most recent call last) /Users/mabshoff/sage-3.1.2.rc1/ipython console in module() /Users/mabshoff/sage-3.1.2.rc1/local/lib/python2.5/site-packages/sage/ modular/hecke/module.py in hecke_operator(self, n) 858int n -- an integer at least 1. 859 -- 860 return self.hecke_algebra().hecke_operator(n) 861 862 def T(self, n): /Users/mabshoff/sage-3.1.2.rc1/local/lib/python2.5/site-packages/sage/ modular/hecke/algebra.py in hecke_operator(self, n) 184 pass 185 n = int(n) -- 186 T = hecke_operator.HeckeOperator(self, n) 187 self.__hecke_operator[n] = T 188 return T /Users/mabshoff/sage-3.1.2.rc1/local/lib/python2.5/site-packages/sage/ modular/hecke/hecke_operator.py in __init__(self, parent, n) 360 HeckeAlgebraElement.__init__(self, parent) 361 if not isinstance(n, int): -- 362 raise TypeError, n must be an int 363 self.__n = n 364 TypeError: n must be an int Ticket time: we are tracking the problem at http://trac.sagemath.org/sage_trac/ticket/4098 Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Trace of Hecke Operator with large integer
On Wed, Sep 10, 2008 at 1:52 PM, mabshoff [EMAIL PROTECTED] wrote: Hi, even with what will become 3.1.2.rc2 this blows up on a 32 bit build: varro:~/sage-3.1.2.rc1 mabshoff$ ./sage -- | SAGE Version 3.1.2.rc1, Release Date: 2008-09-08 | | Type notebook() for the GUI, and license() for information.| -- sage: M1 = ModularSymbols(21,2) sage: T1 = M1.hecke_operator(13^8) sage: trace1=T1.trace() sage: print trace1 2651076189 sage: M1 = ModularSymbols(21,2) sage: T1 = M1.hecke_operator(13^9) --- TypeError Traceback (most recent call last) /Users/mabshoff/sage-3.1.2.rc1/ipython console in module() /Users/mabshoff/sage-3.1.2.rc1/local/lib/python2.5/site-packages/sage/ modular/hecke/module.py in hecke_operator(self, n) 858int n -- an integer at least 1. 859 -- 860 return self.hecke_algebra().hecke_operator(n) 861 862 def T(self, n): /Users/mabshoff/sage-3.1.2.rc1/local/lib/python2.5/site-packages/sage/ modular/hecke/algebra.py in hecke_operator(self, n) 184 pass 185 n = int(n) -- 186 T = hecke_operator.HeckeOperator(self, n) 187 self.__hecke_operator[n] = T 188 return T /Users/mabshoff/sage-3.1.2.rc1/local/lib/python2.5/site-packages/sage/ modular/hecke/hecke_operator.py in __init__(self, parent, n) 360 HeckeAlgebraElement.__init__(self, parent) 361 if not isinstance(n, int): -- 362 raise TypeError, n must be an int 363 self.__n = n 364 TypeError: n must be an int Ticket time: we are tracking the problem at http://trac.sagemath.org/sage_trac/ticket/4098 I posted a fix (which needs review). William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Trace of Hecke Operator with large integer
i have windows Xp Os and i use sage 3.1.1 vmware with notebook. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Trace of Hecke Operator with large integer
I use a toshiba Laptop with Pentium dual core and 2 gega memory --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Trace of Hecke Operator with large integer
On Sep 10, 2:09 pm, Raouf [EMAIL PROTECTED] wrote: i have windows Xp Os and i use sage 3.1.1 vmware with notebook. Ok, then you are using a 32 bit build. At http://trac.sagemath.org/sage_trac/attachment/ticket/4098/trac-4098.patch you can find a patch that fixes the issue and should cleanly apply against 3.1.1. It will be in 3.1.2 which should be out in a few days. Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Trace of Hecke Operator with large integer
How can i use this patch? http://trac.sagemath.org/sage_trac/attachment/ticket/4098/trac-4098.p... --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sage on eeepc
OK! so im not the best with unix commands, is there a way to mount it to /home/user/E? without the colon? thanks! Jon On Sep 10, 4:48 pm, mabshoff [EMAIL PROTECTED] dortmund.de wrote: On Sep 10, 12:20 pm, hypermonkey2 [EMAIL PROTECTED] wrote: Hi, OK! so ive managed to extract sage onto an SD card (ext2 formatted). when i run sage, i get this: -- | SAGE Version 3.1.1, Release Date: 2008-08-17 | | Type notebook() for the GUI, and license() for information. | -- /usr/bin/env: sage.bin: No such file or directory /home/user/E:/sage/local/bin/sage-sage: line 171: sage-cleaner: command not found /home/user/E:/sage/local/bin/sage-sage: line 218: sage-ipython: command not found any ideas?? Did you mount the disk to /home/user/E:? The colon, i.e. : is a path separation character under Linux/Unix, so this cannot work. Moving Sage to some place where the path has no colon should work. Thanks! Jon Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sage on eeepc
To be more precise the SD card is mounted on /media/E: On Sep 10, 6:45 pm, hypermonkey2 [EMAIL PROTECTED] wrote: OK! so im not the best with unix commands, is there a way to mount it to /home/user/E? without the colon? thanks! Jon On Sep 10, 4:48 pm, mabshoff [EMAIL PROTECTED] dortmund.de wrote: On Sep 10, 12:20 pm, hypermonkey2 [EMAIL PROTECTED] wrote: Hi, OK! so ive managed to extract sage onto an SD card (ext2 formatted). when i run sage, i get this: -- | SAGE Version 3.1.1, Release Date: 2008-08-17 | | Type notebook() for the GUI, and license() for information. | -- /usr/bin/env: sage.bin: No such file or directory /home/user/E:/sage/local/bin/sage-sage: line 171: sage-cleaner: command not found /home/user/E:/sage/local/bin/sage-sage: line 218: sage-ipython: command not found any ideas?? Did you mount the disk to /home/user/E:? The colon, i.e. : is a path separation character under Linux/Unix, so this cannot work. Moving Sage to some place where the path has no colon should work. Thanks! Jon Cheers, Michael- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Trace of Hecke Operator with large integer
Thank u everybody for the Help. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] SnapPeaPython
Hi again! i am trying to get SnapPeaPython running in SAGE on my EEEpc (on an SD card (ext2)). [1;31meeepc-jonathanl: [1;34m/media/E/SnapPeaPython [1;00m sudo python setup.py build running build running build_py running build_ext building 'SnapPea.SnapPeaC' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict- prototypes -fPIC -DDEBUG_MALLOC=0 -ISnapPeaC/headers -ISnapPeaC/ unix_kit -I/usr/include/python2.4 -c SnapPeaC/SnapPeaC.c -o build/ temp.linux-i686-2.4/SnapPeaC/SnapPeaC.o unable to execute gcc: No such file or directory error: command 'gcc' failed with exit status 1 any ideas where this gcc problem comes from? Thanks so much, Jon --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: SnapPeaPython
Hello, On Wed, Sep 10, 2008 at 5:45 PM, hypermonkey2 [EMAIL PROTECTED] wrote: unable to execute gcc: No such file or directory error: command 'gcc' failed with exit status 1 any ideas where this gcc problem comes from? It looks like you don't have gcc installed on your system. --Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: SnapPeaPython
Cool! i actually did not have gcc, but i installed it now. my error looks like now: [1;31meeepc-jonathanl: [1;34m/media/E/SnapPeaPython [1;00m python setup.py build running build running build_py running build_ext building 'SnapPea.SnapPeaC' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict- prototypes -fPIC -DDEBUG_MALLOC=0 -ISnapPeaC/headers -ISnapPeaC/ unix_kit -I/usr/include/python2.4 -c SnapPeaC/SnapPeaC.c -o build/ temp.linux-i686-2.4/SnapPeaC/SnapPeaC.o SnapPeaC/SnapPeaC.c:25:20: error: Python.h: No such file or directory SnapPeaC/SnapPeaC.c:27:19: error: ctype.h: No such file or directory SnapPeaC/SnapPeaC.c:28:20: error: assert.h: No such file or directory In file included from SnapPeaC/SnapPeaC.c:29: SnapPeaC/headers/kernel.h:13:20: error: string.h: No such file or directory SnapPeaC/headers/kernel.h:14:18: error: math.h: No such file or directory In file included from /usr/lib/gcc/i486-linux-gnu/4.1.2/include/ syslimits.h:7, from /usr/lib/gcc/i486-linux-gnu/4.1.2/include/ limits.h:11, from SnapPeaC/headers/kernel.h:15, from SnapPeaC/SnapPeaC.c:29: /usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h:122:61: error: limits.h: No such file or directory In file included from SnapPeaC/headers/kernel.h:35, from SnapPeaC/SnapPeaC.c:29: SnapPeaC/headers/kernel_prototypes.h:586: error: expected ‘)’ before ‘bytes’ SnapPeaC/SnapPeaC.c:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:43:19: error: stdio.h: No such file or directory SnapPeaC/SnapPeaC.c:44:20: error: stdlib.h: No such file or directory SnapPeaC/SnapPeaC.c: In function ‘uAcknowledge’: SnapPeaC/SnapPeaC.c:49: warning: implicit declaration of function ‘PyErr_Warn’ SnapPeaC/SnapPeaC.c:49: error: ‘PyExc_UserWarning’ undeclared (first use in this function) SnapPeaC/SnapPeaC.c:49: error: (Each undeclared identifier is reported only once SnapPeaC/SnapPeaC.c:49: error: for each function it appears in.) SnapPeaC/SnapPeaC.c: In function ‘uFatalError’: SnapPeaC/SnapPeaC.c:57: warning: implicit declaration of function ‘snprintf’ SnapPeaC/SnapPeaC.c:57: warning: incompatible implicit declaration of built-in function ‘snprintf’ SnapPeaC/SnapPeaC.c:61: warning: implicit declaration of function ‘PyErr_SetString’ SnapPeaC/SnapPeaC.c:61: error: ‘SnapPea_Fatal’ undeclared (first use in this function) SnapPeaC/SnapPeaC.c: In function ‘uAbortMemoryFull’: SnapPeaC/SnapPeaC.c:66: warning: implicit declaration of function ‘PyErr_NoMemory’ SnapPeaC/SnapPeaC.c: In function ‘uQuery’: SnapPeaC/SnapPeaC.c:81: warning: incompatible implicit declaration of built-in function ‘snprintf’ SnapPeaC/SnapPeaC.c:82: error: ‘SnapPea_Query’ undeclared (first use in this function) SnapPeaC/SnapPeaC.c: At top level: SnapPeaC/SnapPeaC.c:108: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:125: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:126: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:127: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:128: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:129: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:130: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:131: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:132: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:133: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:134: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:135: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:137: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:138: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:139: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:141: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token SnapPeaC/SnapPeaC.c:144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
[sage-support] Re: efficient determinant of matrix over polynomial ring
On Sep 5, 10:14 am, Martin Albrecht [EMAIL PROTECTED] wrote: sage: %time d2 = R(C._singular_().det()) CPU times: user 0.04 s, sys: 0.01 s, total: 0.05 s Wall time: 0.15 s This seems to scale very poorly with the number of variables. Basically, it's impractical to compute determinants when there are more than 4 variables. Variables Time (seconds) 2 0.05 3 0.71 4 11.65 5 252.53 Sage commands / output: sage: R.a,b = QQ[] sage: C = random_matrix(R,8,8) sage: %time d = R(C._singular_().det()) CPU times: user 0.05 s, sys: 0.00 s, total: 0.06 s Wall time: 0.17 s sage: R.a,b,c = QQ[] sage: C = random_matrix(R,8,8) sage: %time d = R(C._singular_().det()) CPU times: user 0.71 s, sys: 0.00 s, total: 0.72 s Wall time: 1.54 s sage: R.a,b,c,d = QQ[] sage: C = random_matrix(R,8,8) sage: %time d = R(C._singular_().det()) CPU times: user 11.65 s, sys: 0.05 s, total: 11.70 s Wall time: 18.53 s sage: R.a,b,c,d,e = QQ[] sage: C = random_matrix(R,8,8) sage: %time d = R(C._singular_().det()) CPU times: user 252.53 s, sys: 0.07 s, total: 252.60 s Wall time: 329.91 s --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] PIL and jpeg on OS X workaround
I had been having trouble for a while figuring out how to load jpgs into a usable form on OS X. The optional PIL spkg that gets installed through sage -i PIL-1.1.5.spkg would throw an IOError when I tried to load in a jpeg, complaining that the jpeg decoder wasn't available. I found a work around tonight, which was to install PIL through macports (py25-pil is the package name). I already had libjpeg installed through macports (jpeg is the package name). Then I just went into the directory where PIL got installed, /opt/local/lib/ python2.5/site-packages/, and then copied the PIL folder and PIL.pth into sage's python: /Applications/sage/local/lib/python/site-packages/ With that stuff there, I can now do sage: import pylab sage: imjpg = pylab.imread(DATA+'aarts02.jpg') sage: pylab.imshow(imjpg) sage: pylab.savefig('imjpg') and I actually see an image. If I can provide information or anything else helpful for turning this hack into something that works the way sage is supposed to, please let me know. Regards, JM --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://www.sagemath.org -~--~~~~--~~--~--~---