[sage-support] Re: Dimensional Analysis or Unit Conversion capability?

2009-06-26 Thread William Stein
On Wed, Jun 24, 2009 at 6:23 PM, Robert Bradshaw wrote: > > On Jun 24, 2009, at 5:11 AM, Maurizio wrote: > >> I totally agree, but unfortunately it seems there are not so many >> people involved in the development of SAGE, focused on these topics. > > This was true of many things that are now in S

[sage-support] Re: How to construct piecewise in order to manipulate them?

2009-06-26 Thread David Sevilla
Hi, On Jun 25, 9:12 pm, David Joyner wrote: > I know multiplication is very finicky. You might try using > R. = PolynomialRing(RR, "t") instead, but I'm not sure that will work > either. > > Can you post more of your code so I can give a more detailed answer? a = [-1, 0, 1.5, 3.2, 5] k = len(a

[sage-support] How to teach "import" where modules are?

2009-06-26 Thread Simon King
Dear All, during development of a package, I changed the layout. When I started, I had a module mtx on top level (hence, "import mtx" was possible), but now it is a sub-module (hence, "import pGroupCohomology.mtx" is needed). Problem: I saved some data in the old layout, and now I would like to

[sage-support] Re: How to construct piecewise in order to manipulate them?

2009-06-26 Thread David Joyner
I think one of your problems was that the definition of L2 was illegal since it ran into an out of range index problem. (In Python, all lists start at 0.) There may be better ways but, in any case, the following works. Note I had to change the definition of L2 so that you would not get an error:

[sage-support] trouble with solve()

2009-06-26 Thread Stan Schymanski
Dear all, How can I get sage to solve a simple equation such as the one below? -- | Sage Version 4.0.2, Release Date: 2009-06-18 | | Type notebook() for the GUI, and license() for information.|

[sage-support] Re: trouble with solve()

2009-06-26 Thread Stan Schymanski
Update: In maxima, I simply have to answer 'no' to the question whether n is an integer and I obtain the solution. How can I pass the 'no' to maxima through sage?? Stan Stan Schymanski wrote: > Dear all, > > How can I get sage to solve a simple equation such as the one below? > > -

[sage-support] Re: NumberField Polynomial Roots

2009-06-26 Thread John Cremona
On Jun 25, 10:00 pm, davidloeffler wrote: > On Jun 25, 6:28 pm, egb wrote: > > > Hello! > > >I have a polynomial P, let's say P = x^3 - 139656*x^2 - > > 59208339456*x - 1467625047588864. > > >K. = NumberField(P) > > >Clearly a.charpoly() gives me P. I want to know if th

[sage-support] Re: How to teach "import" where modules are?

2009-06-26 Thread Lars Fischer
Hello Simon, you could try: import pGroupCohomology.mtx as mtx Here is an example with sage and os.path: sage: import os.path sage: os.path sage: os.path.a os.path.abspath os.path.altsep sage: import os.path as path sage: path.a path.abspath path.altsep After the imports imports os.path and

[sage-support] Re: How to teach "import" where modules are?

2009-06-26 Thread Simon King
Dear Lars, On Jun 26, 1:43 pm, Lars Fischer wrote: > you could try: > import pGroupCohomology.mtx as mtx This is one of the things that I tried, but it didn't help. When loading a pickle of some class instance from mtx, it was still complaining. Probably, in the long run, the easiest is to te

[sage-support] Notebook do not work

2009-06-26 Thread Michael
Hello i am just starting to work with SAGE and if I start it on the commando line it starts without problem. But if i start notebook (notebook()) from this enviroment it starts my Browser( "Konqueror") follwoing happens: In the sage enviroment: sage: notebook() The notebook files are stored in: /

[sage-support] Re: Notebook do not work

2009-06-26 Thread William Stein
On Fri, Jun 26, 2009 at 1:52 PM, Michael wrote: > > Hello i am just starting to work with SAGE and if I start it on the > commando line it starts without problem. But if i start notebook > (notebook()) from this enviroment it starts my Browser( "Konqueror") > follwoing happens: Just do notebo

[sage-support] Re: How to teach "import" where modules are?

2009-06-26 Thread William Stein
On Fri, Jun 26, 2009 at 1:52 PM, Simon King wrote: > > Dear Lars, > > On Jun 26, 1:43 pm, Lars Fischer > wrote: >> you could try: >> import pGroupCohomology.mtx  as mtx > > This is one of the things that I tried, but it didn't help. When > loading a pickle of some class instance from mtx, it was

[sage-support] Bug in sage.symbolic.expression.Expression.__init__ (sage.4.0.2)

2009-06-26 Thread Nicolas
I think there is definitely a bug in the __init__ method of the Expression class. Probably it has not been tracked down because this method is quasi never used in the new version of symbolics. However, it raises problems when one wants to derive a suclass from Expression. The bug is described in

[sage-support] Re: Notebook do not work

2009-06-26 Thread adam mohamed
Dear All, I am having the same problem as the one below on a windows machine and I tried: notebook(open_viewer=False) in vain. What I should do? Thanks Adam On Fri, Jun 26, 2009 at 2:06 PM, William Stein wrote: > > On Fri, Jun 26, 2009 at 1:52 PM, Michael wrote: > > > > Hello i am just start

[sage-support] Re: Bug in sage.symbolic.expression.Expression.__init__ (sage.4.0.2)

2009-06-26 Thread Burcin Erocal
On Fri, 26 Jun 2009 06:14:13 -0700 (PDT) Nicolas wrote: > > I think there is definitely a bug in the __init__ method of the > Expression class. > Probably it has not been tracked down because this method is quasi > never used in the new version of symbolics. However, it raises > problems when o

[sage-support] numpy.random

2009-06-26 Thread giovanni.marche...@ds.unifi.it
I would like to sample from a multinomial distribution. What's wrong in the following statements in sage 4.0.1? >>> import numpy.random >>> numpy.random.multinomial(10, [.5,.5], size=20) Thank you -- Giovanni Traceback (click to the left for traceback) ... TypeError: unsupported operand paren

[sage-support] Re: Bug in sage.symbolic.expression.Expression.__init__ (sage.4.0.2)

2009-06-26 Thread William Stein
On Fri, Jun 26, 2009 at 4:20 PM, Burcin Erocal wrote: > > On Fri, 26 Jun 2009 06:14:13 -0700 (PDT) > Nicolas wrote: > >> >> I think there is definitely a bug in the __init__ method of the >> Expression class. >> Probably it has not been tracked down because this method is quasi >> never used in t

[sage-support] unable to use prun

2009-06-26 Thread Ethan Van Andel
I'm trying to profile my code using "prun" like the tutorial says. However, I can't get it to work. For example a command like this: %prun plot(x,0,2) gives this error: Syntax Error: %prun plot(x,0,2) and this: prun plot(x,0,2) gives this error: line 4 prun plot(x,_sage_const_0 ,_sage_con

[sage-support] Re: unable to use prun

2009-06-26 Thread William Stein
On Fri, Jun 26, 2009 at 4:47 PM, Ethan Van Andel wrote: > > I'm trying to profile my code using "prun" like the tutorial says. > However, I can't get it to work. For example a command like this: > %prun plot(x,0,2) > gives this error: > Syntax Error: >    %prun plot(x,0,2) > and this: > prun plot(

[sage-support] bug with integrate

2009-06-26 Thread Loïc
Hello list, I found a problem with integrate, look at the following sequence: sage: integrate(sin(x)/(cos(x))^2,x) 1/cos(x) It's ok - Now I try to add an interval: sage: integrate(cos(x)/(sin(x))^2,x,pi/6,pi/4) ERROR: An unexpected error occurred while tokenizing inpu

[sage-support] Re: trouble with solve()

2009-06-26 Thread Kjetil Halvorsen
On Fri, Jun 26, 2009 at 07:11, Stan Schymanski wrote: > > Update: > In maxima, I simply have to answer 'no' to the question whether n is an > integer and I obtain the solution. How can I pass the 'no' to maxima > through sage?? > Try to use assume() befotre the call to maxima? > Stan > > Stan Sc