[sage-support] Re: Handling Axiom crashes in Sage

2009-07-25 Thread MaxTheMouse
> On Jul 24, 3:10 pm, MaxTheMouse wrote: > > > I gave it a quick trial and got a syntax error. > > Can you tell me which polynomial it crashed on (i.e., what D is after > the crash)? > > I had been getting syntax errors on that statement before, but I > realized it was because Axiom sticks extra

[sage-support] Re: version control of worksheets

2009-07-25 Thread pang
On Jul 24, 6:52 pm, William Stein wrote: > I can think of no reason it would be dangerous to do that.  Just > control the files of the form worksheet.txt, since they determine the > worksheets. > > I can also not think of a simpler way to accomplish this. > > William Thanks them. It's done, and

[sage-support] Re: doctests and the long flag

2009-07-25 Thread Robert Bradshaw
On Jul 24, 2009, at 11:22 AM, Simon King wrote: > > I think it would be nice to have the possibility to do the following > in doc tests: > > """ > EXAMPLES:: > > sage: R. = QQ[] > # > sage: I = ... # some nasty ideal > sage: G = I.groebner_basis() > #> > sage: GM = I.groe

[sage-support] Potential memory leak when calling binomial

2009-07-25 Thread Stephen Hartke
The following code ends up using a lot of memory: print get_memory_usage() for i in range(10): b=binomial(5,2) print get_memory_usage() Output: 133.48828125 135.015625 So 1.5 extra megabytes is used after the 100,000 calls of binomial. If repeated calls to binomial are made, eventually

[sage-support] Re: doctests and the long flag

2009-07-25 Thread William Stein
On Fri, Jul 24, 2009 at 2:19 PM, Robert Bradshaw wrote: > > On Jul 24, 2009, at 11:22 AM, Simon King wrote: > >> >> I think  it would be nice to have the possibility to do the following >> in doc tests: >> >> """ >> EXAMPLES:: >> >>     sage: R. = QQ[] >>     # >>     sage: I = ... # some nasty id

[sage-support] Re: Potential memory leak when calling binomial

2009-07-25 Thread Justin C. Walker
On Jul 25, 2009, at 08:08 , Stephen Hartke wrote: > The following code ends up using a lot of memory: > > print get_memory_usage() > for i in range(10): >b=binomial(5,2) > print get_memory_usage() > > Output: > 133.48828125 > 135.015625 I just tried this on 4.0.2 and 4.1 (on Mac OS X, 1

[sage-support] Re: doctests and the long flag

2009-07-25 Thread Robert Bradshaw
On Jul 25, 2009, at 9:38 AM, William Stein wrote: > > On Fri, Jul 24, 2009 at 2:19 PM, Robert > Bradshaw wrote: >> >> On Jul 24, 2009, at 11:22 AM, Simon King wrote: >> >>> >>> I think it would be nice to have the possibility to do the >>> following >>> in doc tests: >>> >>> """ >>> EXAMPLES:

[sage-support] side-effect when evaluating a function

2009-07-25 Thread pca
Dear all, I have been puzzled, and annoyed, by an unexpected side-effect. It can be demonstrated in the notebook by the following example. It models the speed as distance / time, then solve for the distance, then evaluate the distance with different arguments: var('v d t') equation = v == d /

[sage-support] Re: side-effect when evaluating a function

2009-07-25 Thread Minh Nguyen
Hi Pierre, On Sun, Jul 26, 2009 at 5:31 AM, pca wrote: > > Dear all, > > I have been puzzled, and annoyed, by an unexpected side-effect. It > can be demonstrated in the notebook by the following example. It > models the speed as distance / time, then solve for the distance, then > evaluate the

[sage-support] Re: side-effect when evaluating a function

2009-07-25 Thread pca
Thank you for your quick answer, Minh. Although it would give the correct answer, it does not satisfy my wish to distinguish constants from parameters. In my engineering pblm, I have a set of several constants that I use in many statements, and I wish to keep them together nicely, and use them in

[sage-support] Re: side-effect when evaluating a function

2009-07-25 Thread William Stein
On Sat, Jul 25, 2009 at 12:31 PM, pca wrote: > > Dear all, > > I have been puzzled, and annoyed, by an unexpected side-effect.  It > can be demonstrated in the notebook by the following example.  It > models the speed as distance / time, then solve for the distance, then > evaluate the distance wi

[sage-support] Re: side-effect when evaluating a function

2009-07-25 Thread pca
GREAT ! Thanks for the amazing support ! I have just used Sage for one day, and I was disappointed by this side- effect. But with such an outstanding support, I'm now convinced it's the tool to use ! PC On 25 juil, 22:07, William Stein wrote: > On Sat, Jul 25, 2009 at 12:31 PM, pca wrote: > >

[sage-support] Re: RTF or HTML notes?

2009-07-25 Thread pca
Thanks William, I found your post about the shift-click interesting. You may know how to remove an empty input cell from the notebook: could you share your tip ? Is this explained anywhere in the Notebook documentation ? I couldn't find it. As a workaround, I'm clicking on the Edit tab to edit

[sage-support] Re: RTF or HTML notes?

2009-07-25 Thread William Stein
On Sat, Jul 25, 2009 at 1:24 PM, pca wrote: > > Thanks William, > > I found your post about the shift-click interesting. > > You may know how to remove an empty input cell from the notebook: > could you share your tip ? Delete all contents of the cell, then press "backspace". > Is this explaine

[sage-support] Re: RTF or HTML notes?

2009-07-25 Thread pca
Great ! Thanks! I see that you wrote that page, so may I suggest an improvement ? As a beginner, I did see that page when starting to use the notebook, but I scanned the first couple of items, and thought I did not really need to know anything about "attaching scripts" or "Autoevaluate Cells on

[sage-support] Re: RTF or HTML notes?

2009-07-25 Thread Minh Nguyen
On Sun, Jul 26, 2009 at 6:46 AM, pca wrote: > > Great ! Thanks! > > I see that you wrote that page, so may I suggest an improvement ? > > As a beginner, I did see that page when starting to use the notebook, > but I scanned the first couple of items, and thought I did not really > need to know any

[sage-support] Is preparse the problem? Sage not compute FFT

2009-07-25 Thread Rafael Costa
Why Sage not execute the python code? from scipy import * from pylab import * sample_rate=1000.00 t=r_[0:0.6:1/sample_rate] N=len(t) s=sin(2*pi*50*t)+sin(2*pi*70*t+pi/4) S=fft(s) f=sample_rate*r_[0:(N/2)]/N n=len(f) plot(f,abs(S[0:n])/N) error message: Traceback (most recent call last): Fil

[sage-support] Re: [sage-devel] Preparse is the problem? Sage not compute FFT

2009-07-25 Thread Minh Nguyen
Hi Rafael, On Sun, Jul 26, 2009 at 6:29 AM, Rafael Costa wrote: > > Why Sage not execute the python code? > > from scipy import * > from pylab import * > > sample_rate=1000.00 > t=r_[0:0.6:1/sample_rate] > N=len(t) > s=sin(2*pi*50*t)+sin(2*pi*70*t+pi/4) > S=fft(s) > f=sample_rate*r_[0:(N/2)]/N >

[sage-support] Re: Potential memory leak when calling binomial

2009-07-25 Thread Stephen Hartke
On Sat, Jul 25, 2009 at 1:54 PM, Justin C. Walker wrote: > I just tried this on 4.0.2 and 4.1 (on Mac OS X, 10.5.7), and got the > same values before and after the loop, so something else must be > involved. > Justin, Thanks for your response! Did you run it from the command line or the notebo

[sage-support] Re: Potential memory leak when calling binomial

2009-07-25 Thread Justin C. Walker
On Jul 25, 2009, at 15:08 , Stephen Hartke wrote: > On Sat, Jul 25, 2009 at 1:54 PM, Justin C. Walker > wrote: > >> I just tried this on 4.0.2 and 4.1 (on Mac OS X, 10.5.7), and got the >> same values before and after the loop, so something else must be >> involved. >> > > Justin, > > Thanks

[sage-support] Re: Is preparse the problem? Sage not compute FFT

2009-07-25 Thread Jason Grout
Rafael Costa wrote: > Why Sage not execute the python code? > Please see the identically named thread on sage-devel today for lots more comments and a working version of the code. http://groups.google.com/group/sage-devel/browse_thread/thread/fd1414514c5d83b2 Thanks, Jason --~--~-

[sage-support] Re: Potential memory leak when calling binomial

2009-07-25 Thread Stephen Hartke
On Sat, Jul 25, 2009 at 6:04 PM, Justin C. Walker wrote: > > I noticed that in the notebook, the code does create a problem, > ^ not?? > > but random values do. > Yes, I missed a "not". > Yup. I now see what you see: memory usage increases after

[sage-support] Re: Potential memory leak when calling binomial

2009-07-25 Thread Carlo Hamalainen
On Sat, Jul 25, 2009 at 5:08 PM, Stephen Hartke wrote: > Might this be related to how binomial is evaluated using GiNaC?  Similar > problems occur when replacing binomial with log. Valgrind says yes: ==26568== 4 bytes in 1 blocks are definitely lost in loss record 35 of 3,312 ==26568==at 0x