[sage-support] Re: Memoizing methods.

2008-09-04 Thread adrian
That is exactly what I wanted. Thanks!!! -Adrian. On Sep 3, 7:31 pm, Mike Hansen [EMAIL PROTECTED] wrote: Hi Adrian, I wrote some code to do this a few releases ago.  It's the cached_method decorator in Sage.  Here's your example: sage: class dog(): :     def __init__(self,

[sage-support] if-statement with infinity or NaN

2008-09-04 Thread agi
Hi, I want to check if a number is set to infinity or NaN. So I tried this if-statement: if x!=infinity: print x But this doesn't work when x=a/b with a very small b, so that x becomes infinity. (I'm using SAGE Version 3.0.1) Agi --~--~-~--~~~---~--~~ To

[sage-support] Re: if-statement with infinity or NaN

2008-09-04 Thread agi
I have this: H is a real-valued Matrix z=abs(H[i,j]/H[j,j]) if z!=infinity: print H[i,j], H[i,j].parent() print H[j,j], H[j,j].parent() print z But it doesn't work: H[ 2 , 1 ]= -0.0243252127705267 Real Field with 53 bits of precision H[ 1 , 1 ]= 0.000 Real Field with

[sage-support] Upgrade to version 3.1.1

2008-09-04 Thread Maike
Hello, I just upgraded from 3.0.5 to version 3.1.1 and several things aren't working any more: 1. sliders aren't showing when used with the interact-functionality. It doesn't work the way it used to in the older version, and it doesn't work when I copy examples directly from the documentation.

[sage-support] Re: if-statement with infinity or NaN

2008-09-04 Thread John Cremona
2008/9/4 agi [EMAIL PROTECTED]: I have this: H is a real-valued Matrix z=abs(H[i,j]/H[j,j]) if z!=infinity: print H[i,j], H[i,j].parent() print H[j,j], H[j,j].parent() print z But it doesn't work: H[ 2 , 1 ]= -0.0243252127705267 Real Field with 53 bits of precision H[ 1 ,

[sage-support] Re: if-statement with infinity or NaN

2008-09-04 Thread David Philp
On 04/09/2008, at 8:22 PM, agi wrote: Hi, I want to check if a number is set to infinity or NaN. So I tried this if-statement: if x!=infinity: print x But this doesn't work when x=a/b with a very small b, so that x becomes infinity. (I'm using SAGE Version 3.0.1) If x = 1.0/0 and

[sage-support] Re: if-statement with infinity or NaN

2008-09-04 Thread John Cremona
2008/9/4 David Philp [EMAIL PROTECTED]: On 04/09/2008, at 8:22 PM, agi wrote: Hi, I want to check if a number is set to infinity or NaN. So I tried this if-statement: if x!=infinity: print x But this doesn't work when x=a/b with a very small b, so that x becomes infinity. (I'm

[sage-support] Incorrect computations of Eisenstein series

2008-09-04 Thread Peter Bruin
Hi, When computing Eisenstein series with a given character, Sage may return some forms with a wrong character. The following lines show an example of this: sage: G = DirichletGroup(7) sage: E = EisensteinForms(G[4]).eisenstein_series() sage: E[0].character() == G[4] False The problem appears

[sage-support] Re: Why c.real() and c.imag() works so slow?

2008-09-04 Thread vakaras
Just out of curiosity, what did you have to add? Your latest code takes only seconds on my computer My computer is much older, and always overloaded. were you ever able to get it reasonable on yours? My principle is - program must run as fast as it is possible. It's reason to move. On Sep 3,

[sage-support] Re: if-statement with infinity or NaN

2008-09-04 Thread Jason Merrill
On Sep 4, 7:23 am, John Cremona [EMAIL PROTECTED] wrote: 2008/9/4 David Philp [EMAIL PROTECTED]: I think this is better: http://sagemath.org/doc/ref/module-sage.rings.real-mpfr.html since RDF (double precision reals) is deprecated.  Again, look for is_infinity. John Cremona RDF is

[sage-support] Re: if-statement with infinity or NaN

2008-09-04 Thread John Cremona
2008/9/4 Jason Merrill [EMAIL PROTECTED]: On Sep 4, 7:23 am, John Cremona [EMAIL PROTECTED] wrote: 2008/9/4 David Philp [EMAIL PROTECTED]: I think this is better: http://sagemath.org/doc/ref/module-sage.rings.real-mpfr.html since RDF (double precision reals) is deprecated. Again, look

[sage-support] including images

2008-09-04 Thread Maike
Hi, I'd like to include an .eps graphic in my sage-notebook output. neither the latex \includegraphics command nor the html img tag seem to work. Which command can I use, and where should I save the .eps file? I've also tried to find the files created by the sage .save(...) function (hoping to

[sage-support] How do I share a notebook with collaborators?

2008-09-04 Thread Stan Schymanski
Dear all, I haven't found any useful documentation on the Share and Publish features of notebooks. I would like to make a local notebook viewable/ editable by collaborators, so I thought I just click on the Share button at the top of the notebook and get guided through the process. All that

[sage-support] Re: Upgrade to version 3.1.1

2008-09-04 Thread William Stein
On Thu, Sep 4, 2008 at 3:53 AM, Maike [EMAIL PROTECTED] wrote: Hello, I just upgraded from 3.0.5 to version 3.1.1 and several things aren't working any more: 1. sliders aren't showing when used with the interact-functionality. It doesn't work the way it used to in the older version, and

[sage-support] Re: polyhedra with float coordinates

2008-09-04 Thread Marshall Hampton
OK, this is now trac ticket #4060. I will fix it as soon as I can, probably so a fix can be in whatever comes after sage-3.1.2. M. Hampton On Sep 3, 8:58 pm, Marshall Hampton [EMAIL PROTECTED] wrote: No, this is my fault for being lazy. I only work with exact coordinates, so I did not

[sage-support] documentation on show()

2008-09-04 Thread john_perry_usm
Hello, I think I've found a documentation bug, but perhaps I just don't know how to read the documentation. Trac #2132 seems to reflect the same misunderstanding I had and could perhaps be closed either immediately or after a change in documentation. The documentation for show() states that the

[sage-support] Re: documentation on show()

2008-09-04 Thread john_perry_usm
Update: when I say that axes and frame don't appear to work, I mean after creating an implicit plot. They work find with a regular plot. thanks john perry On Sep 4, 9:16 am, john_perry_usm [EMAIL PROTECTED] wrote: Hello, I think I've found a documentation bug, but perhaps I just don't know

[sage-support] Re: polyhedra with float coordinates

2008-09-04 Thread dghersi
Thank you very much! Dario On Sep 4, 9:42 am, Marshall Hampton [EMAIL PROTECTED] wrote: OK, this is now trac ticket #4060.  I will fix it as soon as I can, probably so a fix can be in whatever comes after sage-3.1.2. M. Hampton On Sep 3, 8:58 pm, Marshall Hampton [EMAIL PROTECTED] wrote:

[sage-support] colors on implicit_plot

2008-09-04 Thread john_perry_usm
Hello, The plot() function uses the color or rgbcolor options. The implicit_plot() function does not recognize this, but requests instead the option cmap. Now cmap recognizes neither the names of colors recognized by plot(), nor rgb tuples. What cmap *does* recognize is completely

[sage-support] Re: Incorrect computations of Eisenstein series

2008-09-04 Thread Craig Citro
Hi Peter, I've actually been planning on going back and cleaning up/speeding up the Eisenstein series code at some point in the near future anyway. I'm on vacation this week, but I'll look at this at the beginning of next week. In the interim, this is now:

[sage-support] Re: if-statement with infinity or NaN

2008-09-04 Thread agi
It works with not z.is_infinity(). Thanks :) --~--~-~--~~~---~--~~ 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

[sage-support] Re: Upgrade to version 3.1.1

2008-09-04 Thread Robert Bradshaw
On Sep 4, 2008, at 6:37 AM, William Stein wrote: On Thu, Sep 4, 2008 at 3:53 AM, Maike [EMAIL PROTECTED] wrote: Hello, I just upgraded from 3.0.5 to version 3.1.1 and several things aren't working any more: 1. sliders aren't showing when used with the interact-functionality. It

[sage-support] Re: Upgrade to version 3.1.1

2008-09-04 Thread Jason Grout
Robert Bradshaw wrote: 3. Syntax on arrows has changed. Before I gave the starting and ending point of the arrow, now you have to give the starting point and the difference between the starting and ending points (something like (3,4) meaning 3 to the right, 4 up). However, the

[sage-support] Interact - multiple inputs for same parameter?

2008-09-04 Thread kcrisman
Is it possible to create an @interact setup such that there are two ways to specify the same input? That is, perhaps one wants to use the slider to get close to a desired input, but then for fine-tuning beyond the user's motor skill control (e.g. if there are hundreds of slider steps), one could

[sage-support] Re: polyhedra with float coordinates

2008-09-04 Thread Marshall Hampton
OK, I think I have fixed this.A patch is up at http://trac.sagemath.org/sage_trac/ticket/4060 awaiting review. I am cross-posting this to sage-devel to hopefully attract a reviewer. In the meantime you could patch your own source if you'd like. If you aren't comfortable doing that, you

[sage-support] Re: Interact - multiple inputs for same parameter?

2008-09-04 Thread Marshall Hampton
There is a work-around though: have two controls (say coarse and fine) and then use the sum of those variables as the actual parameter. As a stupid example: pre @interact def stest(a = slider(0,3.14,.1,1.5), b = slider(0,.1,.01)): sum_var = a + b show(plot(lambda x: sin(x), 0, sum_var),