[sage-devel] Re: Why is the Groebner basis not an ideal

2008-01-24 Thread Simon King
Dear Martin, On 24 Jan., 00:50, Martin Albrecht <[EMAIL PROTECTED]> wrote: > > This looks strange to me (close to a bug). > > This is not a bug but a deliberate design decision that an ideal is a distinct > mathematical object from a set of polynomials spanning the ideal. OK, as a conscious deci

[sage-devel] Re: Partitioning a list

2008-01-24 Thread vgermrk
Let me be the first of many (i like this game :-) to give you (hopefully) the final solution: sage: def partition(v,n,pad=0): ...return [(v+[pad]*(n-len(v)%n))[i:i+n] for i in range(0,len(v),n)] -vgermrk- On 24 Jan., 01:34, Jason Grout <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] w

[sage-devel] Re: Partitioning a list

2008-01-24 Thread vgermrk
Let me be the first of many (i like this game :-) to give you (hopefully) the final solution: def partition(v,n,pad=0): return [(v+[pad]*(n-len(v)%n))[i:i+n] for i in range(0,len(v),n)] -vgermrk- On 24 Jan., 01:34, Jason Grout <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > O

[sage-devel] Re: Partitioning a list

2008-01-24 Thread vgermrk
Let me be the first of many ;-) to say that's maybe more efficient to use a temporary variable for the padding: def partition(v,n,pad=0): t=(v+[pad]*(n-len(v)%n)) return [t[i:i+n] for i in range(0,len(v),n)] -vgermrk- On 24 Jan., 09:46, vgermrk <[EMAIL PROTECTED]> wrote: > Let me be

[sage-devel] Re: Partitioning a list

2008-01-24 Thread William Stein
On Jan 23, 2008 4:34 PM, Jason Grout <[EMAIL PROTECTED]> wrote: > > > [EMAIL PROTECTED] wrote: > > > > > > > > On Wed, 23 Jan 2008, William Stein wrote: > > > >> On Jan 23, 2008 4:12 PM, Jason Grout <[EMAIL PROTECTED]> wrote: > >>> Does anyone know the best way to partition a list into sublists of

[sage-devel] Re: base ring for adjacency matrices of graphs

2008-01-24 Thread Jason Grout
[EMAIL PROTECTED] wrote: > > > > On Wed, 23 Jan 2008, Jason Grout wrote: > >> >> Robert's patch on trac #1900 affords an opportunity to bring up a small >> simplification of adjacency_matrix(). It seems that the over_integers >> parameter over-complicates the interface. There are other more

[sage-devel] Re: Partitioning a list

2008-01-24 Thread Jason Grout
William Stein wrote: > On Jan 23, 2008 4:34 PM, Jason Grout <[EMAIL PROTECTED]> wrote: >> >> [EMAIL PROTECTED] wrote: >>> >>> >>> On Wed, 23 Jan 2008, William Stein wrote: >>> On Jan 23, 2008 4:12 PM, Jason Grout <[EMAIL PROTECTED]> wrote: > Does anyone know the best way to partition a li

[sage-devel] Re: Partitioning a list

2008-01-24 Thread William Stein
On Jan 24, 2008 5:32 AM, Jason Grout <[EMAIL PROTECTED]> wrote: > > > William Stein wrote: > > On Jan 23, 2008 4:34 PM, Jason Grout <[EMAIL PROTECTED]> wrote: > >> > >> [EMAIL PROTECTED] wrote: > >>> > >>> > >>> On Wed, 23 Jan 2008, William Stein wrote: > >>> > On Jan 23, 2008 4:12 PM, Jason

[sage-devel] Re: Partitioning a list

2008-01-24 Thread Harald Schilly
On Jan 24, 1:47 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > > Thanks. I would actually strongly encourage you or somebody to > sit down and actually write a function that has the _same_ functionality > as http://reference.wolfram.com/mathematica/ref/Partition.html Hi, i would also suggest t

[sage-devel] backwards incompatibility

2008-01-24 Thread Jason Grout
The discussion related to #1900 brings up a point about backwards compatibility. Last summer, it seemed like we could change the interface from version to version and it wasn't a big deal---the community was small enough and updated often enough that we weren't worried about preserving or eve

[sage-devel] Re: Partitioning a list

2008-01-24 Thread Jason Grout
Harald Schilly wrote: > On Jan 24, 1:47 pm, "William Stein" <[EMAIL PROTECTED]> wrote: >> Thanks. I would actually strongly encourage you or somebody to >> sit down and actually write a function that has the _same_ functionality >> as http://reference.wolfram.com/mathematica/ref/Partition.html >

[sage-devel] giant doctest file in gsl

2008-01-24 Thread mhampton
I just ran out of space on my laptop hard-drive, and in cleaning it up to make more room I found something that perhaps folks are not aware of. My 2.10 install was taking up about 20 GB of space; most of that was in one file, sage/gsl/.doctest/out, which was about 18 GB. I think this installatio

[sage-devel] Re: [sage-newbie] R and rpy

2008-01-24 Thread William Stein
On Jan 24, 2008 7:32 AM, Jacob Hicks <[EMAIL PROTECTED]> wrote: > After playing with histograms for a while in sage, I have started to delve > into the source and documentation of rpy. I want to make it work more > seamlessly with sage than it does now. My first priority, which would be of > imm

[sage-devel] Re: Partitioning a list

2008-01-24 Thread Jaap Spies
Jason Grout wrote: > recursion is implemented, so you run into recursion depth problems, and > the support for functional idioms is only going to get "worse", if I > understand the future of Python correctly). On the bright side, list > comprehensions replace a lot of the need and do it very

[sage-devel] Re: backwards incompatibility

2008-01-24 Thread William Stein
On Jan 24, 2008 7:14 AM, Jason Grout <[EMAIL PROTECTED]> wrote: > > The discussion related to #1900 brings up a point about backwards > compatibility. Last summer, it seemed like we could change the > interface from version to version and it wasn't a big deal---the > community was small enough an

[sage-devel] Re: backwards incompatibility

2008-01-24 Thread Jason Grout
William Stein wrote: > On Jan 24, 2008 7:14 AM, Jason Grout <[EMAIL PROTECTED]> wrote: >> The discussion related to #1900 brings up a point about backwards >> compatibility. Last summer, it seemed like we could change the >> interface from version to version and it wasn't a big deal---the >> comm

[sage-devel] Re: Partitioning a list

2008-01-24 Thread boothby
I don't like the forced padding out of the last chunk (mostly because my code which uses a function like this doesn't call for one) def partition(v,n,pad=0): if pad is not None: t=(v+[pad]*(n-len(v)%n)) return [t[i:i+n] for i in range(0,len(v),n)] of course, this makes it so

[sage-devel] Re: backwards incompatibility

2008-01-24 Thread William Stein
On Jan 24, 2008 8:12 AM, Jason Grout <[EMAIL PROTECTED]> wrote: > > > William Stein wrote: > > On Jan 24, 2008 7:14 AM, Jason Grout <[EMAIL PROTECTED]> wrote: > >> The discussion related to #1900 brings up a point about backwards > >> compatibility. Last summer, it seemed like we could change the

[sage-devel] Re: Partitioning a list

2008-01-24 Thread Jason Grout
[EMAIL PROTECTED] wrote: > I don't like the forced padding out of the last chunk (mostly because my code > which uses a function like this doesn't call for one) > > def partition(v,n,pad=0): > if pad is not None: > t=(v+[pad]*(n-len(v)%n)) > return [t[i:i+n] for i in range(0,l

[sage-devel] ACM/SIGSAM Richard D. Jenks Memorial Prize

2008-01-24 Thread David Joyner
(This was posted to the SIGSAM list. Posted here FYI.) 2008 CALL FOR NOMINATIONS ACM/SIGSAM Richard D. Jenks Memorial Prize for Excellence in Computer Algebra Software Engineering The third Richard D. Jenks Memorial Prize for excellence in software engineering for computer algebra will be award

[sage-devel] Re: Partitioning a list

2008-01-24 Thread boothby
On Thu, 24 Jan 2008, Jason Grout wrote: > > [EMAIL PROTECTED] wrote: >> I don't like the forced padding out of the last chunk (mostly because my >> code which uses a function like this doesn't call for one) >> >> def partition(v,n,pad=0): >> if pad is not None: >> t=(v+[pad]*(n-

[sage-devel] Re: R and rpy

2008-01-24 Thread mhampton
OK I think I have learned a little. The following code seems to flush the output properly, and sends it to the current cell. r.postscript(os.curdir+'/out.ps') r.par(ann=0) values = [x for x in srange(0,float(pi),.1)] r.plot(values, [sin(x) for x in values], type='lines') r.dev_off() On Jan 24,

[sage-devel] Re: infinity

2008-01-24 Thread Burcin Erocal
Hello, Today I witnessed a mathematica user struggling with Sage because of the way Sage handles infinity. On trac #1915 you can see an example. On Thu, 17 Jan 2008 09:52:32 -0500 David Harvey <[EMAIL PROTECTED]> wrote: > Question: why does the "unsigned infinity ring" not have a zero > eleme

[sage-devel] Re: backwards incompatibility

2008-01-24 Thread Robert Bradshaw
I think the best way to handle deprecation is to throw an error when the (now invalid) command/options are being used. This way any users of the code will know exactly what the problem is, no matter if they wrote it or how deep it is. After a period of time, this error code can be removed.

[sage-devel] Re: giant doctest file in gsl

2008-01-24 Thread Carl Witty
On Jan 24, 7:28 am, mhampton <[EMAIL PROTECTED]> wrote: > I just ran out of space on my laptop hard-drive, and in cleaning it up > to make more room I found something that perhaps folks are not aware > of. My 2.10 install was taking up about 20 GB of space; most of that > was in one file, sage/gs

[sage-devel] Re: backwards incompatibility

2008-01-24 Thread Jason Grout
Robert Bradshaw wrote: > I think the best way to handle deprecation is to throw an error when > the (now invalid) command/options are being used. This way any users > of the code will know exactly what the problem is, no matter if they > wrote it or how deep it is. After a period of time, th

[sage-devel] Re: backwards incompatibility

2008-01-24 Thread William Stein
On Jan 24, 2008 10:41 AM, Jason Grout <[EMAIL PROTECTED]> wrote: > > Robert Bradshaw wrote: > > I think the best way to handle deprecation is to throw an error when > > the (now invalid) command/options are being used. This way any users > > of the code will know exactly what the problem is, no ma

[sage-devel] Re: R and rpy

2008-01-24 Thread William Stein
On Jan 24, 2008 9:24 AM, mhampton <[EMAIL PROTECTED]> wrote: > > OK I think I have learned a little. The following code seems to flush > the output properly, and sends it to the current cell. > > r.postscript(os.curdir+'/out.ps') > r.par(ann=0) > values = [x for x in srange(0,float(pi),.1)] > r.p

[sage-devel] python sum function

2008-01-24 Thread Joel B. Mohler
Hi, A long time ago I noticed a comment in the prod function about doing a divide-and-conquer product scheme so as to take advantage of asymptotically fast multiplication. Ironically, at the time I thought it was a pretty esoteric idea which would only be useful in bizarre cases. But, I've

[sage-devel] Re: python sum function

2008-01-24 Thread William Stein
On Jan 24, 2008 12:03 PM, Joel B. Mohler <[EMAIL PROTECTED]> wrote: > > Hi, > > A long time ago I noticed a comment in the prod function about doing a > divide-and-conquer product scheme so as to take advantage of asymptotically > fast > multiplication. Ironically, at the time I thought it was a

[sage-devel] Re: backwards incompatibility

2008-01-24 Thread Robert Bradshaw
On Jan 24, 2008, at 11:20 AM, William Stein wrote: > On Jan 24, 2008 10:41 AM, Jason Grout <[EMAIL PROTECTED]> > wrote: >> >> Robert Bradshaw wrote: >>> I think the best way to handle deprecation is to throw an error when >>> the (now invalid) command/options are being used. This way any users

[sage-devel] Re: sage-2.10.1.alpha0/1: notebook and jmol don't work for me

2008-01-24 Thread Robert Bradshaw
On Jan 23, 2008, at 2:04 PM, mabshoff wrote: > > > >>> Thank you! It did solve it, jmol works now. The notebook doesn't, >>> but >>> i understood this will be solved in another alpha-version. >> >>> In sage-2.10, that i obtained without installing java-1_4_2-caco- >>> devel, ldapjdk and ldapj

[sage-devel] Re: infinity

2008-01-24 Thread David Roe
So perhaps the solution to your problem is the extended integers (or extended rationals). This needs some work (both in terms of speed and with having multiple types for elements of the same parent), but it does have the benefit of returning 1 as the answer to 1 + 0/infinity. Perhaps the default

[sage-devel] Re: ACM/SIGSAM Richard D. Jenks Memorial Prize

2008-01-24 Thread William Stein
On Jan 24, 2008 9:06 AM, David Joyner <[EMAIL PROTECTED]> wrote: > > (This was posted to the SIGSAM list. Posted here FYI.) > > 2008 CALL FOR NOMINATIONS > > ACM/SIGSAM Richard D. Jenks Memorial Prize > for Excellence in Computer Algebra Software Engineering > > The third Richard D. Jenks Memorial

[sage-devel] Re: R and rpy

2008-01-24 Thread mhampton
Did you do that on a linux machine, or on OS X with X11 running? Because it seemed to me that the r.png device required X11. On Jan 24, 1:38 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > On Jan 24, 2008 9:24 AM, mhampton <[EMAIL PROTECTED]> wrote: > > > > > OK I think I have learned a little.

[sage-devel] Fast algorithm for computing multiplicative integer partitions

2008-01-24 Thread Brian Granger
Hi, This is a follow on to yesterdays thread about computing multiplicative partitions of integers... Today, a co-worker and myself found a (non-obvious) fast algorithm for doing this. Suprisingly, the tree based methods we began to discuss yesterday turned out to be quite slow as you end up fi

[sage-devel] Re: Fast algorithm for computing multiplicative integer partitions

2008-01-24 Thread boothby
On Thu, 24 Jan 2008, Brian Granger wrote: > > Hi, > > This is a follow on to yesterdays thread about computing > multiplicative partitions of integers... > > Question: where would we begin looking to see if this algorithm is > known already? Let a(m,n) be the number of multiplicative partit

[sage-devel] Re: Fast algorithm for computing multiplicative integer partitions

2008-01-24 Thread Brian Granger
> > Question: where would we begin looking to see if this algorithm is > > known already? > > > Let a(m,n) be the number of multiplicative partitions of integers into m > parts. > > For m fixed, compute a(m,n) for n = 3,4,5... and search for this sequence in > Sloane's encyclopedia. > > And, le

[sage-devel] Re: modular forms of weight one

2008-01-24 Thread David Joyner
Interesting, but sorry, I don't know the answer to your question about the primes. I'm cc'ing sage-devel since you mentioned SAGE and it's implementation of modular forms of weight one. I'm sure someone there can address that better than I. >Date: Thu, 24 Jan 2008 18:33:11 -0500 >From: "Hurt,

[sage-devel] Re: Fast algorithm for computing multiplicative integer partitions

2008-01-24 Thread William Stein
On Jan 24, 2008 3:32 PM, Brian Granger <[EMAIL PROTECTED]> wrote: > > > > Question: where would we begin looking to see if this algorithm is > > > known already? > > > > > > Let a(m,n) be the number of multiplicative partitions of integers into m > > parts. > > > > For m fixed, compute a(m,n) fo

[sage-devel] Re: Fast algorithm for computing multiplicative integer partitions

2008-01-24 Thread Brian Granger
> I think Tom just meant the above as a hint to answer the question > "where would we begin looking to see if this algorithm is known already?" > Sloane's tables of integer sequences: > http://www.research.att.com/~njas/sequences/ > contain a _lot_ of references to the literature and research.

[sage-devel] getting show to print things inline

2008-01-24 Thread Jason Grout
I'd like to get some pretty output for the command: sage: [[show(m), m.rank()] for m in MatrixSpace(GF(2),2)] (i.e., I'd like to actually see what the matrices are when I print the list). Unfortunately, it seems like the show(m) commands print out the latex code (which is then very pretty usi

[sage-devel] sage notebook server

2008-01-24 Thread Jason Grout
On the public sage notebook server, when I'm in a worksheet and click "Revisions" and then click on a revision, I get an error: Internal Server Error An error occurred rendering the requested page. More information is available in the server log. Am I doing something wrong? Jason --~--~

[sage-devel] Re: sage notebook server

2008-01-24 Thread William Stein
On Jan 24, 2008 5:50 PM, Jason Grout <[EMAIL PROTECTED]> wrote: > > On the public sage notebook server, when I'm in a worksheet and click > "Revisions" and then click on a revision, I get an error: > > Internal Server Error > An error occurred rendering the requested page. More information is > av

[sage-devel] Re: ACM/SIGSAM Richard D. Jenks Memorial Prize

2008-01-24 Thread David Joyner
On Jan 24, 2008 4:45 PM, William Stein <[EMAIL PROTECTED]> wrote: > > On Jan 24, 2008 9:06 AM, David Joyner <[EMAIL PROTECTED]> wrote: > > > > (This was posted to the SIGSAM list. Posted here FYI.) > > > > 2008 CALL FOR NOMINATIONS > > > > ACM/SIGSAM Richard D. Jenks Memorial Prize > > for Excelle

[sage-devel] pretty-printing in the notebook

2008-01-24 Thread Jason Grout
Following up on William's tip to look at the displayhook function, here is a function that will enable "pretty-printing" by default in the notebook: def pretty_print (object): if object is None: return import __builtin__ __builtin__._=object try: print html(

[sage-devel] Re: pretty-printing in the notebook

2008-01-24 Thread William Stein
On Jan 24, 2008 9:43 PM, Jason Grout <[EMAIL PROTECTED]> wrote: > > Following up on William's tip to look at the displayhook function, here > is a function that will enable "pretty-printing" by default in the notebook: > > def pretty_print (object): > if object is None: > return >

[sage-devel] Re: pretty-printing in the notebook

2008-01-24 Thread Jason Grout
William Stein wrote: > On Jan 24, 2008 9:43 PM, Jason Grout <[EMAIL PROTECTED]> wrote: >> Following up on William's tip to look at the displayhook function, here >> is a function that will enable "pretty-printing" by default in the notebook: >> >> def pretty_print (object): >> if object is No