[sage-support] Re: matrix with many repeated entries

2009-06-04 Thread Rob Beezer
In-Jae, You can "stack" matrices, which would work here. If top and bottom are matrices with identical number of columns, then top.stack (bottom) will return the right thing. left.augment(right) will build up a matrix "sideways." So for your question above: sage: a=matrix(ZZ, 5, 20, [1]*(5

[sage-support] Re: arg of a symbolic function

2009-06-04 Thread Robert Bradshaw
This is because we don't have a symbolic argument function, so it tries to do it by converting it into a complex. http://trac.sagemath.org/sage_trac/ticket/6220 - Robert On Jun 4, 2009, at 12:48 PM, evlu...@gmail.com wrote: > I'm doing some work with riemann mapping, and I need to create a

[sage-support] Re: Sage 4.0 installation : illegal instruction

2009-06-04 Thread Robert Bradshaw
On Jun 4, 2009, at 5:27 PM, ccandide wrote: > I failed to install Sage 3.4.2 and I was hoping the last Sage 4.0 > version would fix the problem. > Unfortunately, the install fails again with the same error message : > > cand...@candide-desktop:~/sage-4.0-linux-Ubuntu_9.04-sse2-i686-Linux > $ ./sa

[sage-support] Re: problem running sage -t

2009-06-04 Thread Marshall Hampton
If you email me your sandpile.sage file I could try to figure it out. I made a file with a class definition inheriting from DiGraph and everything tested OK, so I can't reproduce this. The only thing I can think of is that perhaps your command "sage" is calling an older version of sage that doesn

[sage-support] Re: problem running sage -t

2009-06-04 Thread davidp
Same problem: sage -t "sandpile.py" Traceback (most recent call last): File "./sandpile.py", line 18, in from sandpile import * File "/home/davidp/math/sandpile/sage/sage-sandpile1.4/sandpile.py", line 167, in class Sandpile(DiGraph): NameError: name 'DiGraph' is not defined

[sage-support] Sage 4.0 installation : illegal instruction

2009-06-04 Thread ccandide
I failed to install Sage 3.4.2 and I was hoping the last Sage 4.0 version would fix the problem. Unfortunately, the install fails again with the same error message : cand...@candide-desktop:~/sage-4.0-linux-Ubuntu_9.04-sse2-i686-Linux $ ./sage -

[sage-support] Re: Typesetting issue

2009-06-04 Thread Paul Sargent
On 4 Jun 2009, at 21:10, Burcin Erocal wrote: > Below you also mention that typesetting of derivatives is also broken, > some examples of that would also be helpful. f = function("f",x) e1 = f == x^2 show(e1) show(integral(e1, x)) show(diff(e1,x)) Derivatives now seem to use a D[0](f)(x) = 2x

[sage-support] Re: A simple question about solve()

2009-06-04 Thread Mike Hansen
On Thu, Jun 4, 2009 at 4:22 PM, fred.ri...@gmail.com wrote: > > I have the same question about solve(). I have a system of quadratic > equations, and i want only the solution real of the system. > > I tried to define the space for all the variables i used, with assume > ()  but solve() return all

[sage-support] Re: A simple question about solve()

2009-06-04 Thread fred.ri...@gmail.com
I have the same question about solve(). I have a system of quadratic equations, and i want only the solution real of the system. I tried to define the space for all the variables i used, with assume () but solve() return all the solution complex or real. Does exist any solution in order to avoi

[sage-support] Re: BUG: wrong dimension for polytopes

2009-06-04 Thread Drini
On Jun 4, 4:37 pm, Marshall Hampton wrote: > Hi, > > Thanks for reporting this bug!  It is now on trac as ticket > #6214:http://trac.sagemath.org/sage_trac/ticket/6214 > > I think I understand what is causing the problem and I will try to > make a patch soon.  The .dim() method tries to store

[sage-support] Re: matrix with many repeated entries

2009-06-04 Thread javier
I dont quite understand the defining rule for your matrix, but in general you can just put whichever rule you have as a function def f(i,j): if ((i<=5) and (j in [1,2,3, 7, ..., 20])) return 1 if i in [6,7,13,..., 20]: return 3 return -1 and then create your matrix us

[sage-support] Re: matrix with many repeated entries

2009-06-04 Thread Jason Grout
Kim, In-Jae wrote: > Sorry, I meant 20 by 20 matrix in the previous e-mail. > Remember that matrices in Sage start at column and row 0 (not 1). I've adjusted your description below by subtracting one from each of your numbers. I think the best way to do this type of function is to define a f

[sage-support] Re: problem running sage -t

2009-06-04 Thread Marshall Hampton
What happens if you rename it "sandpile.py"? I'm not sure that will help but there are some funny differences between running .py and .sage files. -Marshall On Jun 2, 8:35 pm, davidp wrote: > I would like to run the doctests in my file, "sandpile.sage", but get > the following error message: >

[sage-support] Re: BUG: wrong dimension for polytopes

2009-06-04 Thread Marshall Hampton
Hi, Thanks for reporting this bug! It is now on trac as ticket #6214: http://trac.sagemath.org/sage_trac/ticket/6214 I think I understand what is causing the problem and I will try to make a patch soon. The .dim() method tries to store the result in P._dim so it is not recomputed each time, bu

[sage-support] Re: matrix with many repeated entries

2009-06-04 Thread Kim, In-Jae
Sorry, I meant 20 by 20 matrix in the previous e-mail. From: sage-support@googlegroups.com [sage-supp...@googlegroups.com] On Behalf Of Kim, In-Jae [in-jae@mnsu.edu] Sent: Thursday, June 04, 2009 3:19 PM To: sage-support@googlegroups.com Subject: [sag

[sage-support] Re: Using multiple cores with Sage under VMWare Player

2009-06-04 Thread William Stein
On Thu, Jun 4, 2009 at 11:49 AM, James Parson wrote: > > Dear sage-support group, > > Is it possible to have Sage use multiple cores when running it under > VMWare Player? I have a quad-core machine running Sage via the VMWare > player in Windows XP, and I have not been able to figure out how to

[sage-support] Re: matrix with many repeated entries

2009-06-04 Thread Kim, In-Jae
Thank you for your help, Jason. Can I get some help on the following matrix too? a_{i,j} = 1 for 1 \leq i \leq 5 and j \in \{1,2,3, 7, ..., 20}; a_{i,j} =3 for i \in \{6, 7, 13, ..., 19\}; a_{ij}=-1 otherwise >P.S. If you have any suggestions for improving the linear algebra or >making it easi

[sage-support] Re: Typesetting issue

2009-06-04 Thread Burcin Erocal
Hi Ricardo, On Tue, 2 Jun 2009 15:23:41 -0700 (PDT) richi wrote: > > I made a mistake in the example. The correct example is: > f=function("f",x) > a=integrate(f,x,0,1) > show(a) I can confirm that this doesn't work. I opened a ticket: http://trac.sagemath.org/sage_trac/ticket/6211 This was

[sage-support] arg of a symbolic function

2009-06-04 Thread evlu...@gmail.com
I'm doing some work with riemann mapping, and I need to create a function that returns the complex argument of a symbolic function. My function definition is something like f(x) = arg(-i*theta(x)^2*Gap (x)) where theta and Gap are already defined. When I try this, I get this error: TypeError: Ca

[sage-support] Using multiple cores with Sage under VMWare Player

2009-06-04 Thread James Parson
Dear sage-support group, Is it possible to have Sage use multiple cores when running it under VMWare Player? I have a quad-core machine running Sage via the VMWare player in Windows XP, and I have not been able to figure out how to have it use more than a single core. I don't have any fancy para

[sage-support] Re: matrix with many repeated entries

2009-06-04 Thread Jason Grout
Kim, In-Jae wrote: > Hello, > > I would like to create a matrix with many repeated entries, for example, a > matrix with all entries equal to 1. > How can I do this efficiently when the size of the matrix is large? > Hi In-Jae, In Python (i.e., Sage), you can duplicate a list by multiplying i

[sage-support] I cannot make the editor from IDLE to accept mouse operations within ETS spkg

2009-06-04 Thread Jorge E . ´Sanchez Sanchez
Just in case someone knows how to make this easily, from sage I open the IDLE window with sage: !$SAGE_ROOT/local/bin/idle then from the File button in the IDLE window, I choose a File.py from my directories, it opens correctly marking in colour the different commands in the python fi

[sage-support] matrix with many repeated entries

2009-06-04 Thread Kim, In-Jae
Hello, I would like to create a matrix with many repeated entries, for example, a matrix with all entries equal to 1. How can I do this efficiently when the size of the matrix is large? In-Jae --~--~-~--~~~---~--~~ To post to this group, send email to sage-supp

[sage-support] Re: How to set up notebook() on a server?

2009-06-04 Thread mrotsliah
> When you do "secure=False", what happens? sage: notebook(address="131.183.80.251", port=8100, secure=False) The notebook files are stored in: /home/user/.sage//sage_notebook ** WARNING: Running the notebook insecurely not o

[sage-support] Re: How to set up notebook() on a server?

2009-06-04 Thread William Stein
2009/6/4 mrotsliah : > > I am trying to get Sage notebook working over my server so that > students can use it online. > I found these two pages: > > http://groups.google.com/group/sage-support/browse_thread/thread/b151811379e2b3c0 > http://groups.google.com/group/sage-support/browse_thread/thread

[sage-support] How to set up notebook() on a server?

2009-06-04 Thread mrotsliah
I am trying to get Sage notebook working over my server so that students can use it online. I found these two pages: http://groups.google.com/group/sage-support/browse_thread/thread/b151811379e2b3c0 http://groups.google.com/group/sage-support/browse_thread/thread/b6d99cac522a3cd9/6b99c90b85b68d80

[sage-support] Re: WARNING: Output Truncated!

2009-06-04 Thread Laurent
Baruch ha scritto: > When I try to run a simple, iterated function with notebooki(), I get > the warning that my output has been truncated. Hoping to find more > information, I tried using 'search_doc("error messages"), which > apparently just repeats the last error message. > > How can I find th

[sage-support] Re: Functionality equivalent to Mathematica's ComplexExpand?

2009-06-04 Thread William Stein
2009/6/4 Rhys Ulerich : > > Is there an expand or simplify method similar to Mathematica's > ComplexExpand (http://documents.wolfram.com/mathematica/functions/ > ComplexExpand) ?  I have several expressions that use exponentials > with imaginary arguments that I know will kick back a real result,

[sage-support] WARNING: Output Truncated!

2009-06-04 Thread Baruch
When I try to run a simple, iterated function with notebooki(), I get the warning that my output has been truncated. Hoping to find more information, I tried using 'search_doc("error messages"), which apparently just repeats the last error message. How can I find the significance of this warning

[sage-support] BUG: wrong dimension for polytopes

2009-06-04 Thread Drini
I was checking the new polytope commands specifically a polytope in R^2 with points (a,b,c,d,e,f) such that e+b>= c+d e+c >= b+d a+b+c+d+e+f = 31 (this is a polytope I had worked on before so I know it very well) After several tries (documentation still sparse and incomplete) I managed to cos

[sage-support] Re: on the speed of comparing groups in 4.0

2009-06-04 Thread Jerome Lefebvre
oh wow, I got to say thank you for all the digging you've put into this. Thanks, Jerome --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.co

[sage-support] Functionality equivalent to Mathematica's ComplexExpand?

2009-06-04 Thread Rhys Ulerich
Is there an expand or simplify method similar to Mathematica's ComplexExpand (http://documents.wolfram.com/mathematica/functions/ ComplexExpand) ? I have several expressions that use exponentials with imaginary arguments that I know will kick back a real result, but I'm having a rough time gettin

[sage-support] Fwd: SAGE and PARI's Galois fields database

2009-06-04 Thread David Joyner
I'm forwarding this email from Michael Somos to sage-support. The items about the Galois fields database being broken are in the 4.0.1.a0 version of the installation manual. Can anyone on this list determine if a track ticket should be opened for this issue? -- Forwarded message ---

[sage-support] Re: on the speed of comparing groups in 4.0

2009-06-04 Thread simon . king
Hi! > I will open a ticket, I think. Done: #6208, with patch, needs review. Example from the ticket: Without my patch sage: G=SymmetricGroup(7) sage: time L=[X for X in G if X.order()==2] CPU times: user 10.19 s, sys: 2.12 s, total: 12.31 s Wall time: 15.48 s With my patch sage: G=Sy

[sage-support] Re: on the speed of comparing groups in 4.0

2009-06-04 Thread simon . king
Again Hi! On Jun 4, 10:00 am, simon.k...@uni-jena.de wrote: ... > So, if nobody tells me that the above is complete nonsense, I will try > and improve Gap._execute_line. I did, and there was an improvement. Before (using your two functions as a test), I had sage: time L=genSub1(3) CPU times

[sage-support] Re: Reading numbers from a file

2009-06-04 Thread Burcin Erocal
On Thu, 4 Jun 2009 01:21:06 -0700 (PDT) Nicolas wrote: > > This is almost what I want to do. I had figured out that trick but my > problem is that the line that is input is, in my case, really long and > gulps a lot of memory. > > Thus, to save memory, I need to read the numbers one by one (or

[sage-support] Re: Folders to organise worksheets

2009-06-04 Thread William Stein
On Thu, Jun 4, 2009 at 1:36 AM, kilucas wrote: > > As a set of worksheets grows I feel I need to organise them into my > own folder structure. On sagenb I can see Active, Archived and Trash > folders for worksheets but can't spot a way to create my own folders > or navigate such a folder structur

[sage-support] Folders to organise worksheets

2009-06-04 Thread kilucas
As a set of worksheets grows I feel I need to organise them into my own folder structure. On sagenb I can see Active, Archived and Trash folders for worksheets but can't spot a way to create my own folders or navigate such a folder structure afterwards. Can I do this (and especially - can I do thi

[sage-support] Re: Reading numbers from a file

2009-06-04 Thread Nicolas
This is almost what I want to do. I had figured out that trick but my problem is that the line that is input is, in my case, really long and gulps a lot of memory. Thus, to save memory, I need to read the numbers one by one (or a small bunch of them at a time). It seems I have to read line by lin

[sage-support] Re: Reading numbers from a file

2009-06-04 Thread Craig Citro
> This is almost what I want to do. I had figured out that trick but my > problem is that the line that is input is, in my case, really long and > gulps a lot of memory. > > Thus, to save memory, I need to read the numbers one by one (or a > small bunch of them at a time). It seems I have to read

[sage-support] Re: Reading numbers from a file

2009-06-04 Thread Craig Citro
> In short, anyone knows a simple trick provided by sage or python to > read numbers from a file without redoing the parsing stuff ? > Luckily, both python's float type and Sage's RealDoubleField (or any of the RealFields) are smart enough to convert from strings: [craigci...@sharma ~/temp] $ c

[sage-support] Re: on the speed of comparing groups in 4.0

2009-06-04 Thread simon . king
Hi All! On Jun 3, 4:27 pm, simon.k...@uni-jena.de wrote: ... > A partial solution for 3) might be to pre-compile certain useful > regular expressions, and store them as an attribute of the interface > instance. In that way, it would not be needed to do the 83 > compilations of regular expressions

[sage-support] Reading numbers from a file

2009-06-04 Thread Nicolas
Hi all, I tried with sage to read numbers from an ASCII file, like ReadList does in Mathematica, or cin>>int does in C++. I suppose Python provides some module for that that will avoid me reprogramming the parsing stuff. I stumbled upon the csv module which is far fetched for me because it does