[sage-support] Re: callable symbolic function name to string

2009-04-28 Thread Craig Citro
There's probably a better way, but this works: sage: f = function('hello',x) sage: f._f._name 'hello' (That's just what f._repr_() uses.) -cc On Tue, Apr 28, 2009 at 8:30 PM, Alex Raichev wrote: > > Hi all: > > How do you retrieve the name of a callable symbolic function as a > string?  For i

[sage-support] callable symbolic function name to string

2009-04-28 Thread Alex Raichev
Hi all: How do you retrieve the name of a callable symbolic function as a string? For instance, suppose you have sage: f= function('hello',x) and you want to retrieve 'hello' from f. sage: str(f) '\n hello(x)' followed by stripping away the extra characters

[sage-support] Re: snapshot saving

2009-04-28 Thread Franco Saliola
Franco -- On Tue, Apr 28, 2009 at 11:22 PM, William Stein wrote: > > On Tue, Apr 28, 2009 at 1:45 PM, Franco Saliola wrote: >> On Mon, Apr 27, 2009 at 9:07 PM, William Stein wrote: >>> >>> On Mon, Apr 27, 2009 at 11:45 AM, Jason Grout >>> wrote: William Stein wrote: > On Mon,

[sage-support] pretty print in notebook

2009-04-28 Thread Mikie
I have sage working on a PC in my network. And it comes great. When set "pretty print" and do an integral it gives an error shows Latex. How do I get the pretty print. I am using CentOS and Firefox. --~--~-~--~~~---~--~~ To post to this group, send email to sage

[sage-support] Re: snapshot saving

2009-04-28 Thread William Stein
On Tue, Apr 28, 2009 at 1:45 PM, Franco Saliola wrote: > On Mon, Apr 27, 2009 at 9:07 PM, William Stein wrote: >> >> On Mon, Apr 27, 2009 at 11:45 AM, Jason Grout >> wrote: >>> >>> William Stein wrote: On Mon, Apr 27, 2009 at 11:29 AM, kcrisman wrote: > Just as a postscript, I was rea

[sage-support] Re: scipy.stats.poisson.pmf doesn't work

2009-04-28 Thread William Stein
No. On 4/28/09, Jason Grout wrote: > > William Stein wrote: > >> >>> In normal python (i.e. running python from the command line), >>> the following works fine: >> >> This will evidently get fixed when we upgrade the version of scipy >> included in Sage, which we >> hope to do soon. > > > Are y

[sage-support] Re: scipy.stats.poisson.pmf doesn't work

2009-04-28 Thread Jason Grout
William Stein wrote: > >> In normal python (i.e. running python from the command line), >> the following works fine: > > This will evidently get fixed when we upgrade the version of scipy > included in Sage, which we > hope to do soon. Are you saying this is already fixed in scipy (i.e., a n

[sage-support] Re: scipy.stats.poisson.pmf doesn't work

2009-04-28 Thread Alden
Thanks! On Apr 28, 12:29 pm, Alden wrote: > On two different computers running Ubuntu 9.04, I downloaded and built > from source sage 3.4.1.  I also downloaded scipy using the synaptic > package manager.  I am under the impression that python and scipy in > sage lead completely separate lives fr

[sage-support] Re: scipy.stats.poisson.pmf doesn't work

2009-04-28 Thread William Stein
On Tue, Apr 28, 2009 at 12:35 PM, William Stein wrote: > On Tue, Apr 28, 2009 at 12:29 PM, Alden wrote: >> >> On two different computers running Ubuntu 9.04, I downloaded and built >> from source sage 3.4.1.  I also downloaded scipy using the synaptic >> package manager.  I am under the impressi

[sage-support] Re: scipy.stats.poisson.pmf doesn't work

2009-04-28 Thread William Stein
On Tue, Apr 28, 2009 at 12:29 PM, Alden wrote: > > On two different computers running Ubuntu 9.04, I downloaded and built > from source sage 3.4.1.  I also downloaded scipy using the synaptic > package manager.  I am under the impression that python and scipy in > sage lead completely separate li

[sage-support] Re: scipy.stats.poisson.pmf doesn't work

2009-04-28 Thread Mike Hansen
Hello, On Tue, Apr 28, 2009 at 12:29 PM, Alden wrote: > > On two different computers running Ubuntu 9.04, I downloaded and built > from source sage 3.4.1.  I also downloaded scipy using the synaptic > package manager.  I am under the impression that python and scipy in > sage lead completely sep

[sage-support] scipy.stats.poisson.pmf doesn't work

2009-04-28 Thread Alden
On two different computers running Ubuntu 9.04, I downloaded and built from source sage 3.4.1. I also downloaded scipy using the synaptic package manager. I am under the impression that python and scipy in sage lead completely separate lives from python and scipy outside sage. In normal python

[sage-support] RSACryptosystem in Cryptography book (by Kohel) is ghost :? + small typo

2009-04-28 Thread Jurgis Pralgauskis
Hello, just trying to follow examples of http://www.sagemath.org/library/crypto.pdf Exercise 8.5 solution: page nr 124 (or 127 for file) has suspicious code sage: E := RSACryptosystem(128) sage: m = E.encoding(’The dog ate my lunch.’); m first of all typo of assignment (seems like in Pascal)

[sage-support] Re: substituting initial condition into ODE

2009-04-28 Thread David Joyner
Too tricky, but maybe this helps: sage: c,x = var("c,x") sage: y = function('y',x) sage: soln = desolve(diff(y,x)+sin(x)*y^6==0,y); soln 1/(5*y(x)^5) == c - cos(x) sage: soln.subs(x = pi) 1/(5*y(pi)^5) == c + 1 sage: ssoln = soln.__repr__(); ssoln '1/(5*y(x)^5) == c - cos(x)' sage: ssoln = ssoln.

[sage-support] Re: weird output in notebook (on jaunty installation via debs)

2009-04-28 Thread William Stein
On Tue, Apr 28, 2009 at 11:34 AM, Jurgis Pralgauskis wrote: > > >> Unfortunately, Debian/Ubuntu package a very old and buggy version of >> Sage.    You should use a version of Sage that you download >> fromhttp://sagemath.orginstead.  Get either a binary, or build from >> source. > > why are deb

[sage-support] Re: weird output in notebook (on jaunty installation via debs)

2009-04-28 Thread Jurgis Pralgauskis
> Unfortunately, Debian/Ubuntu package a very old and buggy version of > Sage.    You should use a version of Sage that you download > fromhttp://sagemath.orginstead.  Get either a binary, or build from > source. why are debs not updated? I don't know much about them, and as I remember main pac

[sage-support] Re: substituting initial condition into ODE

2009-04-28 Thread ma...@mendelu.cz
Hello, I just want to test, if I can do with my students in computer lab what they usualy do on the paper 1. find general solution 2. substitute from initail conditions 3. find c 4. use this c in general solution I agree that this may be strange to do this in the case, we have a command for solv

[sage-support] Re: sage error 6520

2009-04-28 Thread Mikie
Yes, I recompiled it and it works. It took 7 hours on the P4. On Apr 27, 9:53 am, Mikie wrote: > Hi, > > I just put Sage3.4.1 on and I am getting "line 198: 3626 Illegral > instruction sage-ip0ython "#@" -i.".  Do you think I should get the > source and recompile it? > Mikie > > On Apr 25, 1:01

[sage-support] Re: substituting initial condition into ODE

2009-04-28 Thread David Joyner
I don't know if you are asking about how to use ICs in desolve or if you are asking about how to do substitutions. Anyway, I get this: sage: y=function('y',x) sage: desolve(diff(y,x)+sin(x)*y^6==0,y) 1/(5*y(x)^5) == c - cos(x) sage: desolve(diff(y,x)+sin(x)*y^6==0,y,[pi,9]) 1/(5*y(x)^5) == (-295

[sage-support] substituting initial condition into ODE

2009-04-28 Thread ma...@mendelu.cz
Dear memebers of SAGE-support I wonder if it is possible to substitute initial conditions into an equation produced by desolve. I tried something like y=function('y',x) desolve(diff(y,x)+sin(x)*y^6==0,y) sol({x:pi,y:9}) and got 1/(5*y(pi)^5) == c + 1 but I would like to see 1/(5*9^5) == c

[sage-support] Re: weird output in notebook (on jaunty installation via debs)

2009-04-28 Thread William Stein
On Tue, Apr 28, 2009 at 7:12 AM, Jurgis Pralgauskis wrote: > > Hello, > > I have sage on fresh Ubuntu jaunty, >  SAGE Version 3.0.5, Release Date: 2008-07-11 > > but when I use notebook, I get unnecessary  output > and line endings of it seem like have encoding problems.. > > you see the screensh

[sage-support] weird output in notebook (on jaunty installation via debs)

2009-04-28 Thread Jurgis Pralgauskis
Hello, I have sage on fresh Ubuntu jaunty, SAGE Version 3.0.5, Release Date: 2008-07-11 but when I use notebook, I get unnecessary output and line endings of it seem like have encoding problems.. you see the screenshot.. http://files.akl.lt/users/jurgis/etc/sagemath-jaunty-weird_output.png w

[sage-support] Re: Help me out from PolynomialRing Error!

2009-04-28 Thread William Stein
On Tue, Apr 28, 2009 at 3:14 AM, wrote: > > Dear Sajan.S, > > On Apr 28, 6:31 am, "Sajan.S" wrote: >> Dear sir, >> >> P.< y0, y1, x0, x1> = PolynomialRing(GF(3),4,order='lex'); >> >> is working in interactive python shell. >> >> but not working in python script file executed at command prompt

[sage-support] Re: differential equations in SAGE

2009-04-28 Thread ma...@mendelu.cz
On 28 Dub, 15:42, "ma...@mendelu.cz" wrote: > Dear SAGE experts, > forgot to write: the test notebook for these issues is at http://www.sagenb.org/home/pub/494/ Robert --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com T

[sage-support] differential equations in SAGE

2009-04-28 Thread ma...@mendelu.cz
Dear SAGE experts, from the output of desolve?? command I understand that desolve call maxima and ode2 to solve ordinary differential equations. 1. How can I get the access to method variable? commands maxima("ode2('diff(y,x)=x^6*cos(y),y,x)") maxima('method') give the answer "separable", but

[sage-support] GAP still doesn't start in sage-3.4.1...

2009-04-28 Thread Johan Oudinet
Hi, I saw in trac that the ticket about my problem to start Sage in a Debian Lenny 64bit is closed since GAP was downgraded. I thought Sage-3.4.1 should now works on my server... but it still doesn't. And the problem is still the same. When I run sage for the first time, I got: *

[sage-support] Re: Help me out from PolynomialRing Error!

2009-04-28 Thread simon . king
Dear Sajan.S, On Apr 28, 6:31 am, "Sajan.S" wrote: > Dear sir, > > P.< y0, y1, x0, x1> = PolynomialRing(GF(3),4,order='lex'); > > is working in interactive python shell. > > but not working in python script file executed at command prompt This is because the interactive shell has a preparser. H

[sage-support] Help me out from PolynomialRing Error!

2009-04-28 Thread Sajan.S
Dear sir, P.< y0, y1, x0, x1> = PolynomialRing(GF(3),4,order='lex'); is working in interactive python shell. but not working in python script file executed at command prompt Error Message is: Code: File "test.py", line 10 P.< y0, y1, y2, x0, x1, x2> = PolynomialRing(GF(2), 6,ord