[sage-support] Re: Something like Mathematica's `Interact`?

2009-11-21 Thread Simon King
Hi! If I am not mistaken, Mathematica calls it manipulate, while interact is Sage's brand. Sorry if I got this wrong. Admittedly my memory for those things is not good, but I think I remember that Sage had that feature before Mathematica. In that case, let us hope that Sage does not end like

[sage-support] Re: Something like Mathematica's `Interact`?

2009-11-21 Thread Simon King
Dear William, On 21 Nov., 10:19, William Stein wst...@gmail.com wrote: [...] I would say that Enthought was a real pioneer in this feature with their Traits system long, long before either Mathematica or Sage had this capability.    So maybe the chronology is:    2002 (??): Enthought

[sage-support] Re: Something like Mathematica's `Interact`?

2009-11-21 Thread Simon King
Hi! On 21 Nov., 11:07, William Stein wst...@gmail.com wrote: ... But then I wonder why Ram, the original poster, referred to Mathematica's manipulate as Mathematica's interact. Can you tell us why? I can't. Sorry, that question was of course addressed to the original poster. Cheers,

[sage-support] Re: Something like Mathematica's `Interact`?

2009-11-21 Thread Simon King
Hi William! On 21 Nov., 11:07, William Stein wst...@gmail.com wrote: [...] There was a question in the Sage Survey about what to do with $10^6. I really think those brand name / trademark / patent / ... things would be worth the money! I don't really care.  I just want everybody to have

[sage-support] Re: Something like Mathematica's `Interact`?

2009-11-21 Thread Simon King
Hi Harald! On 22 Nov., 01:03, Harald Schilly harald.schi...@gmail.com wrote: On Nov 21, 11:11 pm, William Stein wst...@gmail.com wrote:   Matlab, on the other hand... ... for viewing data? i can't read the text because i get nervous/fall asleep, but look at those silly

[sage-support] Re: powers of polynomials in characteristic p0

2009-11-20 Thread Simon King
Hi Luis! On 20 Nov., 19:10, finotti luis.fino...@gmail.com wrote: ... I know that Sage developers have different priorities, but this is sort of important to me... Definitely polynomials *are* a priority for some developers...  So, is there a way I can redefine how Sage computes powers of

[sage-support] Re: Advice on adopting Sage in undergrad teaching?

2009-11-17 Thread Simon King
Hi Alex! On 17 Nov., 22:12, Alex Ghitza aghi...@gmail.com wrote: ... I'm not sure I understand this paragraph.  Mathematically, 0*M is always the zero matrix and never the number 0.  So it seems to me that maple screws up if it returns the number 0.   I don't know whether maple returns the

[sage-support] Re: Sage upgrade

2009-11-10 Thread Simon King
Hi Mikie On 10 Nov., 16:42, Mikie thephantom6...@hotmail.com wrote: I would like to upgrade from 3.2 to 4.??.  The computer is a P4 in my network.  When I did 3.2 I tried the binaries and they didn't work. Something about didn't work on this computer.  Thus I used the source and 8 hours

[sage-support] Re: Matrix inconsistency with decimal/fraction representations

2009-11-04 Thread Simon King
Hi Michael! On 4 Nov., 20:55, Michael Orlitzky mich...@orlitzky.com wrote: [...] it starts using floating point numbers internally. I didn't tell it to do that. You did. 0.5 is a floating point number. Ok, but (assuming it can be done) how do you propose I convert my problem to an exact

[sage-support] Re: AttributeError: object has no attribute 'eigenvalues'

2009-11-04 Thread Simon King
Hi Dan! On 5 Nov., 00:15, Dan Drake dr...@kaist.edu wrote: ... There's a space between eigenvalues and (). Python (and hence Sage) gets confused by that. Use A.eigenvalues() with no spaces. No, that's not true. On sage.math, it works with the additional space. sage: A = matrix([[0, 4], [-1,

[sage-support] Re: Some basic question of new user

2009-10-29 Thread Simon King
Dear Ross, On 29 Okt., 15:29, Ross r76...@gmail.com wrote: [...] i read the Loops, Functions, Control Statements, and Comparisons in Tutorial and try to use the if in sage here is the example for i in range(15):        if gcd(i,15) == 1:            print(i) and try a=5 b=3 d=100

[sage-support] Re: Some basic question of new user

2009-10-29 Thread Simon King
Hi again! On 29 Okt., 15:29, Ross r76...@gmail.com wrote: hi everyone I want to translate some matlab code into sage but i get some problem here are the matlab code if omega=-yo         uno=1;     elseif omega=-yo omega=0         uno=omega/-yo;     else uno=0;     end [...] Q:    

[sage-support] Re: maxima's '

2009-10-28 Thread Simon King
is the relevant part, again: On Oct 27, 4:33 pm, Simon King simon.k...@nuigalway.ie wrote: On 27 Okt., 23:19, Mikie thephantom6...@hotmail.com wrote: ... {{x^2}\over{2}} no integral. I am using Sage V3.4.  Could this be causing the problem? Probably. The whole symbolics stuff has changed since

[sage-support] Re: maxima's '

2009-10-28 Thread Simon King
Mikie, On 28 Okt., 08:36, Simon King simon.k...@nuigalway.ie wrote: On 27 Okt., 23:48, Mikie thephantom6...@hotmail.com wrote: I have it kind of working.  When I do the latex on the integral or answer if their is fraction I get an \over.  I get to get \frac{?} {?}.  Is there anyway to do

[sage-support] Re: maxima's '

2009-10-27 Thread Simon King
Hi! On 27 Okt., 21:49, Mikie thephantom6...@hotmail.com wrote: ...  I have tried maxima.'integrate(x,x) and many other combinations but they all produce a syntax error.  How do I do it in Sage? The fact that you tried this shows that you need to convince yourself that Sage's underlying

[sage-support] Re: maxima's '

2009-10-27 Thread Simon King
Hi! On 27 Okt., 23:19, Mikie thephantom6...@hotmail.com wrote: When I get to latex(g) I get {{x^2}\over{2}} no integral. I am using Sage V3.4.  Could this be causing the problem? Probably. The whole symbolics stuff has changed since then. A complete session with version 4.2: sage:

[sage-support] Re: coercing or substituting variables in symmetric polynomials

2009-10-24 Thread Simon King
Hi David! I can only give you a partial answer, and at one point I became totally puzzled, myself. But let's try: On 23 Okt., 15:16, David Madore david...@madore.org wrote: snip sage: R.x0,x1,x2 = QQ['x0','x1','x2'] sage: x3=-(x0+x1+x2) sage: e = SFAElementary(QQ) sage: e([1]).expand(4) x0

[sage-support] Re: coercing or substituting variables in symmetric polynomials

2009-10-24 Thread Simon King
Hi David! Here is a follow-up. On Oct 24, 8:48 am, Simon King simon.k...@nuigalway.ie wrote: [...] Here comes the point where I am puzzled. Can please someone explain what happens here? I thought that p.subs(x3=x3) is equivalent to p.subs({'x3':x3}). But in contrast to any other example

[sage-support] Re: A little problem with map_threaded

2009-10-24 Thread Simon King
Hi Alasdair! On 24 Okt., 20:01, Alasdair amc...@gmail.com wrote: Actually, just worked it out: matrix(ZZ,2,2,map(int,M.list())) Do you want to convert your matrix into a matrix of Integers (= elements of Sage's ZZ) or into a matrix of Python integers (type int)? Since Python integers don't

[sage-support] Re: Benchmarks w.r.t Matlab

2009-10-22 Thread Simon King
Hi Joaquim! On 22 Okt., 14:22, Joaquim Puig joaquim.p...@gmail.com wrote: ... Is there any set of benchmarks of SAGE vs Matlab? I don't know about Matlab. But there is http://www.sagemath.org/tour-benchmarks.html which is Sage vs. Magma. So, if nothing else is available, it might be better

[sage-support] Re: symmetric polynomials

2009-10-20 Thread Simon King
Hi Pierre! On Oct 20, 2:44 pm, Pierre pierre.guil...@gmail.com wrote: A priori, the two computations (one with I, one with J) are different. Yes, probably I was confusing it with a different problem, namely to find just *some element* in the preimage of an element (if it exists), but not the

[sage-support] Singular hanging

2009-10-17 Thread Simon King
Hi! At several occasions, I got the impression that excessive use of autogenerated variables in the singular interface results in freezing singular. My scenario: - During a lengthy computation, I create several 10,000s instances of SingularElement, but most of them not permanent. So, what I am

[sage-support] Re: Singular hanging

2009-10-17 Thread Simon King
Hi William! On 17 Okt., 21:28, William Stein wst...@gmail.com wrote: Has that problem be noticed before? I've never heard of it before.    This is a pexpect problem, right?  I assume this has nothing to do with libsingular? Correct. I am not using libsingular here. However, it seems it

[sage-support] Re: Singular hanging

2009-10-17 Thread Simon King
On 17 Okt., 21:49, Simon King simon.k...@nuigalway.ie wrote: Anyway. I just wanted to know whether other people have met a frozen Singular and can give me a hint, before I spend too much energy in my bug hunt... I don't know if the following is symptomatic. But I found that Singular

[sage-support] Re: division of integers

2009-10-16 Thread Simon King
Hi Mladen! It is not a bug. Since range returns Python integers (type int) and since 1/2 is zero for Python integers, that behaviour is expected: sage: [type(x) for x in range(3)] [type 'int', type 'int', type 'int'] sage: int(1)/int(2) 0 If you want a range of Sage integers (type Integer),

[sage-support] Re: Syntax misunderstanding in timeit.

2009-10-15 Thread Simon King
Hi Francois! Sorry that I can't answer all of your questions, but I hope that others will step in. On 15 Okt., 14:27, Francois Maltey fmal...@nerim.fr wrote: [...] And a second question : I don't find any example in python documentation for list with .. as  [1..100]. Is it a standard python

[sage-support] What is wrong with this code?

2009-10-14 Thread Simon King
Hi! The following happens on Intel(R) Core(TM)2 CPU, openSUSE 11.0 (X86-64), sage 4.1. It does not happen on sage.math. Consider the following code in listtext.pyx: def ListTest(int n): cdef dict D = dict(zip(range(1,n+1),range(n))) cdef list L = n*[0] cdef int i for i from

[sage-support] Re: What is wrong with this code?

2009-10-14 Thread Simon King
Sorry for the noise: On 14 Okt., 19:19, Simon King simon.k...@nuigalway.ie wrote: The following happens on Intel(R) Core(TM)2 CPU, openSUSE 11.0 (X86-64), sage 4.1. It does not happen on sage.math. ... and the reason is that sage 4.1.1 is running on sage.math. In other words, after

[sage-support] Re: Request

2009-10-13 Thread Simon King
Hi! On Oct 13, 10:27 am, Santanu Sarkar sarkar.santanu@gmail.com wrote: Suppose  we want to plot(y vs x)  with data set as follows: (.1,1), (.2,3), (.4,5), (.5,6). Also we want find plot with two data set as follows: (x1,y1), ,(xn,yn)  and  (x1,y'1),..,(x'n,y'n). We

[sage-support] Re: Obtaining output from a running program?

2009-09-30 Thread Simon King
Hi Alasdair! On 30 Sep., 15:49, Alasdair amc...@gmail.com wrote: ... Is there any way I can force output to appear while the program is still running? The output goes to stdout, which is buffered -- therefore the delay. You can force output by sys.stdout.flush() (dunno if you need to

[sage-support] Re: Polynomial over a finite field using integer coefficients

2009-09-22 Thread Simon King
Hi Shing! Two possibilities: sage: k.a = GF(9) sage: t=a^2+1 Now, you can learn about all possible methods for elements of k by doing sage: t.TAB (you type t, dot, and hit the tab key). This will show you a list of possible methods. One of the methods is called int_repr: sage:

[sage-support] Re: Polynomial over a finite field using integer coefficients

2009-09-22 Thread Simon King
Hi! On 22 Sep., 20:08, Shing Hing Man mat...@yahoo.com wrote: Thanks for the  reply! Just one more question. In general, if k is a finite field, what is k(i), where i is an integer, suppose to be ? Apart from the TAB autocompletion, another useful way to get information is to look into the

[sage-support] Re: GAP logfile

2009-09-19 Thread Simon King
Hi William, On 18 Sep., 23:27, William Stein wst...@gmail.com wrote: You should look at interfaces/gap.py.  There's a function eval in there.  Just add your own hack at the top that opens some logfile and appends to it. I tried to do it such that the value of input_line in the eval() method

[sage-support] Re: GAP logfile

2009-09-19 Thread Simon King
On 19 Sep., 08:11, Simon King simon.k...@nuigalway.ie wrote: [...] So, what other methods (besides eval()) send commands to gap? The situation improves when gap.set() is apppending to the log file as well. But I am not sure if this covers everything. There is also _eval_line and _execute_line

[sage-support] Re: GAP logfile

2009-09-19 Thread Simon King
Next problem: The log file that is created when I put gap=Gap(logfile=logfile) contains symbols that can't be interpreted by GAP. Hence, Read (logfile); in GAP won't work: @iRead(/home/king/SAGE/sage-4.1/local/pGroupCohomology/GapMaxels);

[sage-support] Re: GAP logfile

2009-09-19 Thread Simon King
Hi William! On 19 Sep., 10:45, William Stein wst...@gmail.com wrote: [...] 1.  Those control characters are there because GAP is put in a special control mode when Sage communicates with it.    See the command used to start GAP. 2. Regarding what the logfile option is for, well.. it is

[sage-support] Re: GAP logfile

2009-09-19 Thread Simon King
Hi! On 19 Sep., 11:38, William Stein wst...@gmail.com wrote: [...] Maybe you should try asking on the GAP list what those error messages mean? I already found that the recursion depth trap is GAP's way of avoiding infinite recursion. They give the example gap dive:= function(depth) if depth1

[sage-support] Re: GAP logfile

2009-09-19 Thread Simon King
Sometimes it helps to read the (GAP) manual... I found that GAP offers the possibility to log input, output, or both. So, simply I start my computations with gap.eval('LogTo(gaplog)'), and then all input (including the gap prompt, but this should be easy to remove) is logged. Cheers, Simon

[sage-support] Re: GAP logfile

2009-09-19 Thread Simon King
On 19 Sep., 14:09, Simon King simon.k...@nuigalway.ie wrote: So, simply I start my computations with gap.eval('LogTo(gaplog)'), should be InputLogTo, since LogTo logs both input and output, while InputLogTo only logs the input, without the gap prompt. And also there is no @r and @i! Cheers

[sage-support] GAP logfile

2009-09-18 Thread Simon King
Dear Sage Support, I'd like to debug some ugly problem that I have with GAP (really mysterious: Compute some examples - example #45 fails with a recursion depth trap - repeat example #45 - it works without problem - compute more examples - #110 fails - repeat #110 - it works). I know how I can

[sage-support] Re: sxrange / xsrange possible bug

2009-09-16 Thread Simon King
Hi Mariah, On 16 Sep., 15:29, Minh Nguyen nguyenmi...@gmail.com wrote: [...] Do you mean producing a proper patch file using Mercurial? If yes, then you can use the Mercurial that's shipped with Sage like so. From SAGE_ROOT, you can do something along the lines of the following terminal

[sage-support] Re: A ring with matrix ordering

2009-09-05 Thread Simon King
Hi John! On Sep 5, 3:05 pm, john_perry_usm john.pe...@usm.edu wrote: What do people think?  * Should it (in addition to the current behaviour) be possible to define a matrix ordering by a matrix and a block ordering by a list or tuple? Although you are in favor of the other two

[sage-support] Re: A ring with matrix ordering

2009-09-04 Thread Simon King
Hi Kwankyu, On Sep 4, 8:02 am, Kwankyu ekwan...@gmail.com wrote: In Singular, a ring can be defined with matrix ordering: [...] In Sage, I am trying to construct a polynomial ring with matrix ordering. AFAIK, it is not implemented, but I think that some people were working on it. It is in

[sage-support] Re: A ring with matrix ordering

2009-09-04 Thread Simon King
Hi Kwankyu, On Sep 4, 8:52 am, Kwankyu ekwan...@gmail.com wrote: Hi Simon, The Sage documentation says an unknown term ordering is just passed to the Singular. So in this case, 'M(a)' should be passed to the Singular. Ah, it seems indeed to be a bug!!! Namely, in line 396 of

[sage-support] Re: A ring with matrix ordering

2009-09-04 Thread Simon King
Hi! On Sep 4, 10:10 am, Simon King simon.k...@nuigalway.ie wrote: I don't know whether it would suffice to define an integer matrix a in the Singular interface, though. Let me do some tests. Apparently it isn't that easy. And also I believe that defining an integer matrix in the Singular

[sage-support] Re: A ring with matrix ordering

2009-09-04 Thread Simon King
Again hi! On Sep 4, 10:38 am, Simon King simon.k...@nuigalway.ie wrote: Hi! On Sep 4, 10:10 am, Simon King simon.k...@nuigalway.ie wrote: I don't know whether it would suffice to define an integer matrix a in the Singular interface, though. Let me do some tests. Apparently it isn't

[sage-support] Re: gap packages usable in sage -gap, but not in gap()

2009-08-30 Thread Simon King
Hi William, On Aug 30, 4:48 pm, William Stein wst...@gmail.com wrote: Try doing: sage: gap_reset_workspace() if that works then we have some sort of bug in the optional spkg, since it should have done that. It did work (after restarting sage)! So, it is a bug? It occurred in sage 4.1,

[sage-support] Re: gap packages usable in sage -gap, but not in gap()

2009-08-30 Thread Simon King
On Aug 30, 4:48 pm, William Stein wst...@gmail.com wrote: if that works then we have some sort of bug in the optional spkg, since it should have done that. PS: I don't know if it is a bug in the optional spkg, because David Green did not install it via database_gap, but manually, directly in

[sage-support] Re: gap packages usable in sage -gap, but not in gap()

2009-08-30 Thread Simon King
Hi! On Aug 30, 5:10 pm, William Stein wst...@gmail.com wrote: [...]  It might be worth adding a little message to gap_console() saying something missing?  Maybe try running gap_reset_workspace() first. I wouldn't like to see such message whenever gap_console() is starting, and moreover the

[sage-support] English grammar of numbers

2009-08-29 Thread Simon King
Dear Sage supporters, sorry, I did not find a better title for this thread. It is about the following. If one has a cochain of degree 8, one could say (shorter) 8-cochain. John Palmieri pointed out to me that it should be an 8-cochain, not a 8-cochain, a fact I wasn't aware of. Can someone

[sage-support] Re: English grammar of numbers

2009-08-29 Thread Simon King
Hi! This is a related subject: Isn't the following a bug: sage: n = 113 sage: n.ordinal_str() '113rd' sage: n = 112 sage: n.ordinal_str() '112nd' sage: n = 111 sage: n.ordinal_str() '111st' I opened the ticket http://trac.sagemath.org/sage_trac/ticket/6842 [with patch, needs review] Cheers,

[sage-support] Re: English grammar of numbers

2009-08-29 Thread Simon King
Hi Minh, On Aug 29, 12:30 pm, Minh Nguyen nguyenmi...@gmail.com wrote: [...] and you can safely put a before a number whose spelling begins with a consonant. However, depends on where you are, people do say an hundred-cochain with a silent h, even though at least in Australia it's a

[sage-support] Re: English grammar of numbers

2009-08-29 Thread Simon King
Hi Minh, On Aug 29, 12:32 pm, Minh Nguyen nguyenmi...@gmail.com wrote: On Sat, Aug 29, 2009 at 9:30 PM, Minh Nguyennguyenmi...@gmail.com wrote: [...] And we do this: a one not an one, even though one starts with a vowel. Ah, that confirms my feeling towards an one-cochain. And I have a

[sage-support] Re: A weird exception?

2009-08-29 Thread Simon King
Hi Roland, indeed strange. I think a reasonable approach is to print some status information, e.g.: sage: def expon(mx,g): : print 'expon' : return floor(log(mx)/log(g))+1 : sage: def heelsnel(reeks,maxum): : print reeks : if len(reeks)==1: return

[sage-support] Re: A weird exception?

2009-08-29 Thread Simon King
Hi William, On Aug 29, 5:52 pm, William Stein wst...@gmail.com wrote: [...] Can you post a version where I can actually paste in the code?   You probably have this in a file somewhere without the sage: and ... prompts. Is it possible to change the preparser, so that it not only swallows the

[sage-support] Re: Root simplifying

2009-08-26 Thread Simon King
Hi Jaako, On Aug 26, 5:34 pm, William Stein wst...@gmail.com wrote: Please give Sage code that creates such an expression, which anybody reading this can then trivially paste into their Sage session. I reckon, in the easiest case Jaako would like to have: Given 1/(sqrt(x) - 2), return

[sage-support] Re: Multivariate polynomials in Sage

2009-08-26 Thread Simon King
Hi Nathann, On Aug 26, 6:08 pm, Nathann Cohen nathann.co...@gmail.com wrote: [...] But I have two questions now :     * Could it be possible to define variables indexed two times ? Something like y[0][1]*y[2][3] ?       Could it even be possible to define dictionary variables ( I mean a

[sage-support] Re: Multivariate polynomials in Sage

2009-08-26 Thread Simon King
Hi Nathann, On Aug 26, 6:53 pm, Nathann Cohen nathann.co...@gmail.com wrote: [...] be able to live on the same ring... I would have liked to defined a dictionary variable x, once and forever, such that I can afterward add and multiplicate x[d] and x[c].. There is a multitude of rings in

[sage-support] Re: Root simplifying

2009-08-26 Thread Simon King
Hi! On Aug 26, 11:43 pm, William Stein wst...@gmail.com wrote: [...] Try sage -i fricas-1.0.3.p0 This is from the command line. In an interactive sage session, you can also do sage: install_package('fricas') Note that you don't need to provide the version number in this case, since the

[sage-support] Re: Multivariate polynomials in Sage

2009-08-26 Thread Simon King
Hi Martin, On Aug 26, 10:46 pm, Martin Albrecht m...@informatik.uni-bremen.de wrote: Hi, isn't the OP asking for the infinite polynomial ring which Simon and Mike wrote? I was wondering myself, of course. But in Nathann's examples, the arguments to the dictionary variables are any strings,

[sage-support] Re: characteristic of a field

2009-08-25 Thread Simon King
Hi! On Aug 25, 2:47 pm, J. Cooley j.a.coo...@warwick.ac.uk wrote: Is there a function that will tell you the characteristic of a field? Yes, and it is called characteristic: sage: RR.characteristic() 0 sage: GF(64,'a').characteristic() 2 It also works for rings: sage: ZZ.characteristic() 0

[sage-support] Gantt charts in Sage

2009-08-24 Thread Simon King
Dear sage-support, I learned a new word: Gantt chart. This slightly reminds a bar chart, but here you have horizontal (not vertical) bars, and they don't all start at zero. So, in ascii art, you might have 4 * 3 2 * 1 *** 0 1 2 3 4

[sage-support] Re: bar codes in Sage

2009-08-24 Thread Simon King
Hi Jason, On 24 Aug., 20:30, Jason Grout jason-s...@creativetrax.com wrote: [...] I did some of these in matplotlib recently.  What do you propose for the command and corresponding output? Hm... Perhaps I should first say that I don't need the original purpose of gantt charts, namely to

[sage-support] Re: using minimize_constrained

2009-08-23 Thread Simon King
Hi Greg! On 24 Aug., 01:04, Greg ggdhi...@gmail.com wrote: Hi, how do I go about substituting the results from functions such as minimize_constrained back into the function that was trying to minimize? For example, if I have x,y = var('x y') f = x*y [...] a = (1.0,1.0) If I try the

[sage-support] Re: using minimize_constrained

2009-08-23 Thread Simon King
Hi David! On 24 Aug., 01:32, David Joyner wdjoy...@gmail.com wrote: [...] Or this: sage: x,y = var('x y') sage: f(x,y) = x*y sage: a = sage.numerical.optimize.minimize_constrained(f(x,y),[(1,10),(1,10)],(5,5)) sage: a (1.0, 1.0) sage: f(*a) 1.0 Yes, this is what I meant by more

[sage-support] Re: force sage to print a matrix

2009-08-22 Thread Simon King
Hi Jason, On 22 Aug., 04:49, Jason Grout jason-s...@creativetrax.com wrote: Robert Bradshaw wrote: [...] One problem with this is that then one can't do print M and get what one expects from a non-terminal line (e.g. inside a function, or anything but the last line of a notebook cell).

[sage-support] Re: force sage to print a matrix

2009-08-22 Thread Simon King
Hi Jason! On 22 Aug., 11:15, Jason Grout jason-s...@creativetrax.com wrote: Simon King wrote: [...] Of course, you'd probably do repr(M) instead, which is more standard Python. [...] repr(M) returns a string, but doesn't print it. So, in order to display repr(M) inside a function, you'd do

[sage-support] Re: force sage to print a matrix

2009-08-21 Thread Simon King
On 22 Aug., 00:02, amps arat...@gmail.com wrote: I have a program that outputs a matrix for certain values of n.  for n=5 it works fine but for n=6 it just outputs 29 x 29 dense matrix over Integer Ring how can I force sage to output the actual matrix? Perhaps sage: M =

[sage-support] Re: force sage to print a matrix

2009-08-21 Thread Simon King
On 22 Aug., 00:57, William Stein wst...@gmail.com wrote: On Fri, Aug 21, 2009 at 3:18 PM, Simon King simon.k...@nuigalway.ie wrote: [...]  sage: print M.str() but there might be nicer (and more intuitive!) ways. I think that is the only way.  I can't think of any nicer way.  Any idea what

[sage-support] Re: Error while installing sage 4.1.1 on server for multi users.

2009-08-18 Thread Simon King
Hi! On 17 Aug., 17:41, mrotsliah mrotsl...@gmail.com wrote: I followed the instructions for System-wide install found here http://www.sagemath.org/doc/installation/source.html#installation-in-... When I log on to the server, I try to run sage, and I see the output below.  There is no

[sage-support] Re: Error while installing sage 4.1.1 on server for multi users.

2009-08-18 Thread Simon King
Oops: On 18 Aug., 22:04, Simon King simon.k...@nuigalway.ie wrote: If I am not mistaken, /home/bob/.sage/ipython is a folder ... I mean, /home/bob/.sage is that folder, and its sub-folder ipython is one example for the permanent data it contains

[sage-support] Re: Load Maxima

2009-08-18 Thread Simon King
Hi William, hi Mikie, On 19 Aug., 01:27, William Stein wst...@gmail.com wrote: On Tue, Aug 18, 2009 at 2:30 PM, Mikiethephantom6...@hotmail.com wrote: Yes, that works. However, I am trying to create a function that has Maxima functions in it and I can't seem to pass values to it.  I am

[sage-support] How to express fraction field elements as (lazy?) power series?

2009-08-16 Thread Simon King
Dear Sage supporters, assume that one has an element of the fraction field of a univariate polynomial ring, say sage: R.t = QQ[] sage: p = 1/(t^2-2*t+1) How can one express p as a formal power series? More precisely: How can one obtain the coefficient of, say, t^100 in said power series?

[sage-support] Re: Factoring in a polynomial ring over a polynomial ring or fraction field

2009-08-13 Thread Simon King
Hi sage-supporters! I think Jeff's question below deserves an answer (and I don't know an answer myself). Since it is still without a reply and disappeared from the screen, I thought I bring it up again. I hope you don't mind. Cheers Simon On Aug 10, 10:36 pm, Jeff jeffpferre...@gmail.com

[sage-support] Re: Debugging; how to use sage -gdb?

2009-08-07 Thread Simon King
Hi Robert, On 7 Aug., 09:06, Robert Bradshaw rober...@math.washington.edu wrote: ... I came to asking about sage -gdb since sage's last words at crashing suggest to use sage -gdb. But then I would expect that it is explained in detail in the documentation. However, searching sage - gdb

[sage-support] Re: Debugging; how to use sage -gdb?

2009-08-07 Thread Simon King
Dear Robert, On Aug 7, 5:17 pm, Robert Bradshaw rober...@math.washington.edu wrote: ... It realloc error prone? Doubtful, or we'd be crashing all over. I thought it was guaranteed   to give you back the same spot if you realloc to something smaller,   but that may not be the case, and

[sage-support] Debugging; how to use sage -gdb?

2009-08-06 Thread Simon King
Hi! Currently I am puzzled by a bug, and so far my approaches to tackle it down failed. I guess I should use debugging tools such as gdb, but I did not find a tutorial or wiki page concerning sage -gdb. For example: When I start sage -gdb, how do I get the gdb prompt so that I can set break

[sage-support] Re: Debugging; how to use sage -gdb?

2009-08-06 Thread Simon King
What I said about inserting loads(dumps(self)) holds on openSUSE 11.0 Intel Core Duo, but I am afraid it doesn't on sage.math. Anyway. I think sage -gdb should allow me to see what exactly went wrong (freeing non-allocated memory? double free? whatever?), and also show me, in what line the

[sage-support] Re: Debugging; how to use sage -gdb?

2009-08-06 Thread Simon King
Dear Minh, On 7 Aug., 00:46, Minh Nguyen nguyenmi...@gmail.com wrote: This is unrelated but: the version of GCC that is distributed with openSUSE 11.0 is $ gcc --version gcc (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] Copyright (C) 2008 Free Software

[sage-support] Re: matrix term Orderings

2009-08-04 Thread Simon King
Hi Michael, On Aug 4, 9:54 am, Michael Brickenstein brickenst...@mfo.de wrote: Hi! How do I construct matrix orderings in Sage? I had a look at PolynomialRing and TermOrder and did not find anything. I think I remember being told that it is not wrapped in libSingular. This is one of the two

[sage-support] Re: accessing sage notebook with android phone

2009-08-03 Thread Simon King
Hi Pierre, On Aug 3, 2:17 pm, Pierre pierre.guil...@gmail.com wrote: also, now that android supports python, is it possible to install numpy, or parts of SAGE, directly? anyone has tried that ? I think this post is related:

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread Simon King
On 4 Aug., 00:29, VictorMiller victorsmil...@gmail.com wrote: ...  phi = E.isogeny([E(0),P,-P]) for i in xrange(20): timeit('phi(Q)') 625 loops, best of 3: 1.17 ms per loop 625 loops, best of 3: 1.75 ms per loop 125 loops, best of 3: 2.1 ms per loop 125 loops, best of 3: 2.22 ms per loop

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread Simon King
Hi! On 4 Aug., 02:31, VictorMiller victorsmil...@gmail.com wrote: Here are the commands I used: qq = [z for z in primes(10,10+100) if (z%12) == 11] E = EllipticCurve(j=GF(qq[0])(1728)) # E has qq[0]+1 points over GF(qq[0]) factor(qq[0]+1) P = ((qq[0]+1)//3)*E.random_element() K =

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread Simon King
Hi Victor, On 4 Aug., 03:10, VictorMiller victorsmil...@gmail.com wrote: Sorry, here's the definition of Q: Q = E.random_element() Thanks! So, probably it is unrelated with the ticket I mentioned. Also note that the computation time does not increase monotonely: sage: for i in xrange(20):

[sage-support] Re: Why is R running?

2009-07-31 Thread Simon King
On Jul 28, 3:15 am, William Stein wst...@gmail.com wrote: ... Do you think I should post a ticket, changing it into Control-C pressed.  Interrupting interface. Please wait a few seconds? Definitely, yes.  Thanks!!  But instead of not putting the interface name, just replace R by

[sage-support] Re: Why is R running?

2009-07-31 Thread Simon King
Hi William, On Jul 31, 6:21 pm, William Stein wst...@gmail.com wrote: ... Here's an example of a way to doctest something like this... D-69-91-130-10:tmp wstein$ more a.py def hi():         sage: sage0.eval(alarm(1); gp.eval('factor(2^997-1)'))     'Interrupting GP/PARI

[sage-support] Re: Why is R running?

2009-07-31 Thread Simon King
So, here is a test for the misleading warning message: sage: print sage0.eval(alarm(1); singular._expect_expr('1')) Control-C pressed. Interrupting R. Please wait a few seconds... --- KeyboardInterrupt

[sage-support] Re: Solving multivariate polynomial systems over GF(2)

2009-07-31 Thread Simon King
Harald, thank you for reminding us of this post. Raphael, Actually I started an answer a while ago, but thought it wouldn't be helpful and therefore didn't post it. On 27 Jul., 19:01, lesshaste drr...@gmail.com wrote: I am new to sage and am attempting to solve systems of multivariate polys

[sage-support] Re: Why is R running?

2009-07-30 Thread Simon King
Hi! On Jul 28, 3:15 am, William Stein wst...@gmail.com wrote: ... in _expect_expression. So, perhapsRisn't involved, but it is just a misleading warning message? It is a bug in the warning message indeed, in line 820. Do you think I should post a ticket, changing it into Control-C

[sage-support] Why is R running?

2009-07-27 Thread Simon King
Hi! I tried to do some profiling, using prun. But at some point I pressed Ctrl-C. The reaction, to my surprise, was the following message: Control-C pressed. Interrupting R. Please wait a few seconds... followed by a traceback that ended with

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

2009-07-24 Thread Simon King
Hi All! On 24 Jul., 16:55, Ethan Van Andel evlu...@gmail.com wrote: ... If I set it up like this, it seems like it won't test the long time one and then will fail the others because it doesn't know what m is. Is there proper way to handle this? I understand this question as follows: If one

[sage-support] Re: Simplify an expression

2009-07-21 Thread Simon King
Hi Roland, On 21 Jul., 06:33, Rolandb rola...@planet.nl wrote: Hi, How to simplify an expression if you have some known relations (equalities)? Example: relation: 0 = a*x1^2 + b*x2^2 expression = (a*x1^2 + b*x2^2)*y1+b*y2^3 Are all your relations polynomial? Then the standard solution is

[sage-support] Re: Save our Souls

2009-07-16 Thread Simon King
Hi! On 16 Jul., 10:51, Dr. David Kirkby david.kir...@onetel.net wrote: ... I've also found 'nohup' useful if running a program from a remote location, as the session does not abort if the connection dies. nohup keeps your process alive if the connection dies, but you can not interact with

[sage-support] Re: Cython Modules

2009-07-16 Thread Simon King
Hi! On 16 Jul., 16:07, Ethan Van Andel evlu...@gmail.com wrote: Thank you, that did the trick. However, while everything compiles now, I cant use my stuff in the notebook. I've run sage -b  and I'm pretty sure my module_list.py and setup.py entries are correct. Do I have to import or include

[sage-support] Re: sort a list

2009-07-15 Thread Simon King
Hi! On 15 Jul., 21:26, Carlos Córdoba ccordob...@gmail.com wrote: This is not about RTFM, because L1.sort() doesn't produce any result. It just modifies the original list in place. ... and this is precisely what the manual tells you. However, you are right: I think that Mikie wants to

[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 be

[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 lars.fischer...@googlemail.com 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

[sage-support] Re: Sages progress and its development timescale

2009-06-25 Thread Simon King
Hi Boris, On Jun 25, 12:59 pm, kex boris.fo...@gmail.com wrote: just upgraded to 4.02 ... I´m thinking what 4.02 really means because sage´s progress is really fast, looking from user perspective Sage version numbers are changing fast ? How far is this project ? Is there a way to show us

[sage-support] Re: How to doctest a pyx file?

2009-06-21 Thread Simon King
Hi! On 20 Jun., 22:10, gsw georgswe...@googlemail.com wrote: If you wish, we could discuss this topic further and in depth on sage- devel (where it belongs), just open a thread there. In the first place, I thought it was a support problem, because I thought that testing any text file should

[sage-support] Why is __init__.py not tested?

2009-06-19 Thread Simon King
Dear Sage supporters, I wrote extensive doc tests for some package. But when I did sage -t -long -optional __init__.py apparently *nothing* was tested -- nevertheless it said that all tests passed. It even said that all tests passed when I inserted an error on purpose. So, why does this

<    2   3   4   5   6   7   8   9   10   >