[sage-combinat-devel] Sage-Combinat meeting in Cernay

2011-12-12 Thread Vincent Delecroix
Dear sage-combinat lovers and Cernay organizers, From the poll (I appologize that I vote twice) it seems that the week from 6/2 to 10/2 has the best possible audience (8 people). http://nuages.domainepublic.net/cd7d/vote/ For my organization (and the one of Stepan), I would like a week to be

Re: [sage-devel] Re: Sage on openSUSE 12.1

2011-12-12 Thread Jeroen Demeyer
On 2011-12-12 00:15, Simon King wrote: Eventually, it was a one-line change in 29 packages. See #12131, which is now needing review. I made it a blocker for sage-5.0, but if people think that openSUSE 12.1 could already be supported by sage-4.8, I wouldn't object... If it gets reviewed soon

[sage-devel] Representation of finite field elements

2011-12-12 Thread Johan S. R. Nielsen
Hi all I work a lot with finite fields and polynomials over these, and the standard string representation of finite field elements as polynomials is not very convenient for me; I would much prefer to represent each non-zero element as a power of the field's generator. I am having trouble making

[sage-devel] Re: Representation of finite field elements

2011-12-12 Thread javier
Hi Johan, do you have the typeset box checked in your notebook? If so, then things are displayed using the latex method instead of the repr one. Cheers, Javier -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to

[sage-devel] Re: Problem calling a base-class cached method from an overridden derived class cached method

2011-12-12 Thread javier
Hi Nicolas, On Dec 9, 11:11 am, Nicolas M. Thiery nicolas.thi...@u-psud.fr wrote: Just an algorithmic suggestion: what about building the conjugacy class recursively by conjugating by generators? This is a one liner with TransitiveIdeal; and roughly speaking, writing C the resulting conjugacy

Re: [sage-devel] Integer Factorization: cunningham-tables-1.1 as a standard spkg

2011-12-12 Thread David Roe
I just did some experiments with SQL. I wanted to see if people had thoughts on the tradeoffs before proceeding. First of all, size on disk. Storing the Cunningham database using a list and dictionary requires 1.04MB. The database takes 10.7MB (perhaps I chose a poor representation. I've

[sage-devel] Re: Integer Factorization: cunningham-tables-1.1 as a standard spkg

2011-12-12 Thread Jason Grout
On 12/12/11 7:38 AM, David Roe wrote: but my guess is that it would take about 90ms (since a single query takes about 80ms to execute). Did you use an index with the table? Jason -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an

Re: [sage-devel] Re: Integer Factorization: cunningham-tables-1.1 as a standard spkg

2011-12-12 Thread David Roe
but my guess is that it would take about 90ms (since a single query takes about 80ms to execute). Did you use an index with the table? Yes. I labelled all of the columns as index=True. I don't know if that's sufficient, or if the size-on-disk would be a lot less without redundant indices:

[sage-devel] Re: Representation of finite field elements

2011-12-12 Thread Johan S. R. Nielsen
On Dec 12, 11:35 am, javier vengor...@gmail.com wrote: Hi Johan, do you have the typeset box checked in your notebook? If so, then things are displayed using the latex method instead of the repr one. Cheers, Javier OF COURSE! Thanks for telling me. I would have thought that I had enough

Re: [sage-devel] Re: Integer Factorization: cunningham-tables-1.1 as a standard spkg

2011-12-12 Thread R. Andrew Ohana
On Mon, Dec 12, 2011 at 06:12, David Roe r...@math.harvard.edu wrote: Yes. I labelled all of the columns as index=True. You should not be indexing all columns, only the ones you are making many queries upon. I don't know if that's sufficient, or if the size-on-disk would be a lot less

[sage-devel] Re: Representation of finite field elements

2011-12-12 Thread Jason Grout
On 12/12/11 8:27 AM, Johan S. R. Nielsen wrote: On Dec 12, 11:35 am, javiervengor...@gmail.com wrote: Hi Johan, do you have the typeset box checked in your notebook? If so, then things are displayed using the latex method instead of the repr one. Cheers, Javier OF COURSE! Thanks for

[sage-devel] Re: Calculation table (mini spreadsheet) for Sage...

2011-12-12 Thread Jonathan
On Dec 11, 8:26 pm, William Stein wst...@gmail.com wrote: Can you please post your code athttp://pastebin.com/or something, since putting it in email results in it getting all mangled by some email clients? Thanks! William Sure thing. A sage worksheet can be downloaded here:

Re: [sage-devel] Integer Factorization: cunningham-tables-1.1 as a standard spkg

2011-12-12 Thread David Roe
First of all, size on disk.  Storing the Cunningham database using a list and dictionary requires 1.04MB.  The database takes 10.7MB (perhaps I chose a poor representation.  I've included my skeleton below). This shouldn't be too much of a concern, assuming the source text files compress

Re: [sage-devel] Re: Integer Factorization: cunningham-tables-1.1 as a standard spkg

2011-12-12 Thread David Roe
On Mon, Dec 12, 2011 at 07:33, R. Andrew Ohana andrew.oh...@gmail.com wrote: On Mon, Dec 12, 2011 at 06:12, David Roe r...@math.harvard.edu wrote: Yes.  I labelled all of the columns as index=True. You should not be indexing all columns, only the ones you are making many queries upon. By

Re: [sage-devel] Re: Representation of finite field elements

2011-12-12 Thread David Roe
So now I have hacked together a patch that works as I will it, both in the shell and notebook. I think it is a bug that the latex representation currently ignores the repr-value of the finite field. What do you other say? Agreed: latex should respect the repr-value. And as long as we're on

[sage-devel] Re: Representation of finite field elements

2011-12-12 Thread Jason Grout
On 12/12/11 8:48 AM, Jason Grout wrote: When I was working on similar issues for printing real numbers (i.e., whether to truncate digits, etc.), Carl Witty brought up a very good point. Just to follow up, Carl Witty's point is here: http://trac.sagemath.org/sage_trac/ticket/7682#comment:32 I

[sage-devel] How to write a Cython wrapper for a C++ function that has a function pointer argument

2011-12-12 Thread kstueve
While writing a Cython wrapper for primesieve (http://code.google.com/ p/primesieve/) I have been unable to wrap the generatePrimes function because of the function pointer argument. I get Cannot convert 'void' to Python object on the last line below. Please help me. I have been reading the

[sage-devel] Re: How to write a Cython wrapper for a C++ function that has a function pointer argument

2011-12-12 Thread Volker Braun
return self.thisptr.generatePrimes... tries to return a C void, but cdef generatePrimes is implicitly declared as returning a python object (try cdef void generatePrimes or return None) -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this

[sage-devel] Re: How to write a Cython wrapper for a C++ function that has a function pointer argument

2011-12-12 Thread kstueve
Thanks Volker. Now I have the following code. I need to take the Python function callback which takes one argument and create a void (*callback) (uint32_t) function pointer to pass to self.thisptr.generatePrimes. How do I do this? Right now I get the error Cannot convert Python object to 'void

Re: [sage-devel] Re: Integer Factorization: cunningham-tables-1.1 as a standard spkg

2011-12-12 Thread R. Andrew Ohana
On Mon, Dec 12, 2011 at 07:08, David Roe r...@math.harvard.edu wrote: On Mon, Dec 12, 2011 at 07:33, R. Andrew Ohana andrew.oh...@gmail.com wrote: On Mon, Dec 12, 2011 at 06:12, David Roe r...@math.harvard.edu wrote: Yes. I labelled all of the columns as index=True. You should not

Re: [sage-devel] Integer Factorization: cunningham-tables-1.1 as a standard spkg

2011-12-12 Thread R. Andrew Ohana
On Mon, Dec 12, 2011 at 06:58, David Roe r...@math.harvard.edu wrote: The extended (Brent) tables I mentioned in my original e-mail are a bit tricker. Now the load time is significant: 3s currently (using a pickled dictionary), though I could probably drop that to 2s with either some

[sage-devel] Converting a symbolic expression to python code

2011-12-12 Thread Michael Orlitzky
Is there an easy way to print a symbolic expression so that it's valid python code? E.g. 2*x^2 -- QQ(2) * x**QQ(2) I frequently deal with expressions that are about two pages long and would like to be able to copy/paste them without cleaning up the code and making the expression

[sage-devel] flask.sagenb.org

2011-12-12 Thread Jason Grout
I plan to shut down the experimental flask.sagenb.org server tomorrow. There has been a warning message on the server for about a month now to this effect. We plan to keep a backup of the worksheets around. If you have worksheets on flask.sagenb.org that you still want to use, please move

[sage-devel] Re: Converting a symbolic expression to python code

2011-12-12 Thread John H Palmieri
On Monday, December 12, 2011 5:13:00 PM UTC-8, Michael Orlitzky wrote: Is there an easy way to print a symbolic expression so that it's valid python code? E.g. 2*x^2 -- QQ(2) * x**QQ(2) How about sage: preparse('2*x^2') 'Integer(2)*x**Integer(2)' -- John -- To post to

[sage-devel] strange ECL RunTimeError when integrating

2011-12-12 Thread Dan Drake
I'm doing some integrals: sage: a, b, t = var('a b t') sage: f(a,b,t) = sin(t)^2/(a + b*cos(t))^2 sage: integrate(f(3/2,1,t), (t,0,2*pi)) -2/5*(sqrt(5) - 3)*pi*sqrt(5) Okay, that's fine. But sage: integrate(f(1.5,1,t), (t,0,2*pi)) blows up with: RuntimeError: ECL says: Error executing code in

Re: [sage-devel] Re: Converting a symbolic expression to python code

2011-12-12 Thread Michael Orlitzky
On 12/12/2011 10:05 PM, John H Palmieri wrote: On Monday, December 12, 2011 5:13:00 PM UTC-8, Michael Orlitzky wrote: Is there an easy way to print a symbolic expression so that it's valid python code? E.g. 2*x^2 -- QQ(2) * x**QQ(2) How about sage: preparse('2*x^2')

[sage-devel] SIGFPE sage in only 14 characters

2011-12-12 Thread William Stein
Hi David (cc: sage-devel), sage: float('nan') 1 BOOM! I've posted a patch at trac 12149 [1] to fix this year-old bug. Somebody please referee it: [1] http://trac.sagemath.org/sage_trac/ticket/12149 -- William Stein Professor of Mathematics University of Washington http://wstein.org

[sage-devel] importing mpmath in 'sage -python' imports everything?

2011-12-12 Thread Jonathan Bober
Does anyone happen to know why this happens? I have a feeling it is going to annoy my sometime soon. Look how long it takes to import mpmath: $ time sage -python -c import mpmath; print mpmath.__version__0.17 real 0m0.809s user 0m0.708s sys 0m0.076s compared to the time it takes to import the

Re: [sage-devel] importing mpmath in 'sage -python' imports everything?

2011-12-12 Thread William Stein
On Mon, Dec 12, 2011 at 11:27 PM, Jonathan Bober jwbo...@gmail.com wrote: Does anyone happen to know why this happens? I have a feeling it is going to annoy my sometime soon. Look how long it takes to import mpmath: $ time sage -python -c import mpmath; print mpmath.__version__0.17 mpmath