Re: [sage-devel] matplotlib test images (and spkg size)

2011-12-14 Thread Dan Drake
On Wed, 14 Dec 2011 at 11:03PM -0600, Jason Grout wrote:f > I'm working on updating matplotlib to 1.1.0. A significant number > of test images were added in this update to matplotlib (over 20M of > images). This has the effect of ballooning the size of the spkg > from the current 12M to 32M. If

Re: [sage-devel] Re: Mathematica/Magma/Sage dictionaries ?

2011-12-14 Thread Rajeev Singh
On Wed, Dec 14, 2011 at 7:53 PM, kcrisman wrote: > >> > For a start, you could try looking at the files mathematica.py and magma.py >> > (etc.) in SAGE_ROOT/devel/sage/sage/ >> > interfaces/.  If you have a bunch of Mathematica code and want to convert >> > it >> > to Sage, it looks like you coul

[sage-devel] matplotlib test images (and spkg size)

2011-12-14 Thread Jason Grout
I'm working on updating matplotlib to 1.1.0. A significant number of test images were added in this update to matplotlib (over 20M of images). This has the effect of ballooning the size of the spkg from the current 12M to 32M. If I delete the test images (including the ones in the current ma

Re: [sage-devel] matching polynomial of a graph

2011-12-14 Thread D. S. McNeil
> Any ideas on the cube graph error? I tried giving it an integer, but it > still wasn't happy. The TypeError looks like a sign that someone assumed that the vertices would be integers and non-integer labels managed to sneak through some code path somehow. No idea how long CubeGraph(5) would take

Re: [sage-devel] Re: matching polynomial of a graph

2011-12-14 Thread Dan Drake
On Wed, 14 Dec 2011 at 07:05PM -0800, Rob Beezer wrote: > Dan, > > http://trac.sagemath.org/sage_trac/ticket/12155 > > http://groups.google.com/group/sage-devel/t/9fc4c6bfa8d005b3 Wow, just a few hours ago. Cosmic convergence! Any ideas on the cube graph error? I tried giving it an integer, but

[sage-devel] Re: matching polynomial of a graph

2011-12-14 Thread Rob Beezer
Dan, http://trac.sagemath.org/sage_trac/ticket/12155 http://groups.google.com/group/sage-devel/t/9fc4c6bfa8d005b3 ;-) Rob On Dec 14, 6:52 pm, Dan Drake wrote: > I'm refereeing a paper on matching polynomials, so I want to use Sage to > check some things. This is literally the very first thing

[sage-devel] matching polynomial of a graph

2011-12-14 Thread Dan Drake
I'm refereeing a paper on matching polynomials, so I want to use Sage to check some things. This is literally the very first thing I tried: sage: g = graphs.CompleteBipartiteGraph(4,3) sage: g.matching_polynomial() [traceback] RuntimeError: Edge vertices must lie in different partitions. I tried

Re: [sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Fernando Perez
On Wed, Dec 14, 2011 at 5:59 PM, Dan Drake wrote: > That's interesting. I wonder if the kernel bit could be used in SageTeX, > where I have a bunch of Sage commands and want to get their outputs. > Perhaps this could make that process much simpler and more extensible. Sure, in the end an ipython

Re: [sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Dan Drake
On Wed, 14 Dec 2011 at 11:57AM -0800, Fernando Perez wrote: > I'm not sure exactly how Sage initializes IPython, but it would be > great if in the port to 0.12, you were able to do everything needed > for the Sage terminal application as a profile. The profile machinery > is much more robust now,

Re: [sage-devel] Re: timeit for mathematicians

2011-12-14 Thread William Stein
On Wed, Dec 14, 2011 at 8:59 AM, William Stein wrote: > > On Dec 14, 2011 12:40 AM, "Nils Bruin" wrote: >> >> On Dec 13, 11:27 pm, William Stein wrote: >> > At least since we're mathematically savvy, we know that there's a lot >> > more to statistics than the normal distribution. >> > >> > Havin

Re: Re: [sage-devel] Magma verbosity

2011-12-14 Thread Martin Albrecht
I wrote StdOutContext for use cases like this actually. Particularly, to capture the protocol of a GB computation: in sage.rings.polynomial.multi_polynomial_ideal: from sage.interfaces.magma import MagmaGBLogPrettyPrinter if prot: log_parser = MagmaGBLogPrettyPrinter(verbo

Re: [sage-devel] Magma verbosity

2011-12-14 Thread William Stein
On Wed, Dec 14, 2011 at 4:13 PM, David Roe wrote: > I helping a colleague try to wrap some magma code that uses verbose > print statements.  Apparently, just setting the verbose flag is not > enough: > > sage: magma.SetVerbose("Factorization",1) > sage: magma.Factorization(56654654654464) > [ <2,

[sage-devel] Re: Bug when taking complement of bipartite graph?

2011-12-14 Thread Rob Beezer
On Dec 14, 12:41 pm, fidelbc wrote: > Here it is, ticket number 12155. Thanks. > G=copy(self) > > Maybe here is where the bipartite property gets transferred to G. I'd say so. > If my counting is right, there are only 8 bipartite graphs whose > complements are also bipartite (and each of them

[sage-devel] Magma verbosity

2011-12-14 Thread David Roe
I helping a colleague try to wrap some magma code that uses verbose print statements. Apparently, just setting the verbose flag is not enough: sage: magma.SetVerbose("Factorization",1) sage: magma.Factorization(56654654654464) [ <2, 11>, <1289, 1>, <21461137, 1> ] Instead, you have to use StdOut

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread William Stein
On Wed, Dec 14, 2011 at 3:39 PM, Harald Schilly wrote: > On Wed, Dec 14, 2011 at 23:50, Harald Schilly > wrote: >> I hacked something together that plots a histogram... > > I made a second version, that uses the timeit command directly and > scales the x-axis manually (i.e. including the 0) > >

[sage-devel] Re: timeit for mathematicians

2011-12-14 Thread Jason Grout
On 12/14/11 4:50 PM, Harald Schilly wrote: I hacked something together that plots a histogram. Well, it looks odd, maybe there is a big obvious bug -- but nevertheless, it's not symmetric and in no way a normal distribution! You could also use http://trac.sagemath.org/sage_trac/ticket/9671. I

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Harald Schilly
On Wed, Dec 14, 2011 at 23:50, Harald Schilly wrote: > I hacked something together that plots a histogram... I made a second version, that uses the timeit command directly and scales the x-axis manually (i.e. including the 0) It just times the factor function, but feel free to edit the .sage fil

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Harald Schilly
On Thu, Dec 15, 2011 at 00:10, William Stein wrote: > > What were you timing? > well, it's in the attached sage file, nothing serious: factor(2**111-1), 10 inner loops and 200 repetitions. if you have a better example to test, go ahead or tell me :) H -- To post to this group, send an email t

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread William Stein
On Wed, Dec 14, 2011 at 2:50 PM, Harald Schilly wrote: > I hacked something together that plots a histogram. Well, it looks odd, > maybe there is a big obvious bug -- but nevertheless, it's not symmetric and > in no way a normal distribution! What were you timing? > H > > > -- > To post to this

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Harald Schilly
I hacked something together that plots a histogram. Well, it looks odd, maybe there is a big obvious bug -- but nevertheless, it's not symmetric and in no way a normal distribution! H -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send

[sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Jason Grout
On 12/14/11 3:52 PM, Volker Braun wrote: On Wednesday, December 14, 2011 8:58:23 PM UTC, jason wrote: > So maybe this is where my confusion lies.. If I make two sucessive posts > to the /eval url, should they > a) both have the same session_id and two different msg_ids, or

[sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Volker Braun
On Wednesday, December 14, 2011 8:58:23 PM UTC, jason wrote: > > > So maybe this is where my confusion lies. If I make two sucessive posts > > to the /eval url, should they > > a) both have the same session_id and two different msg_ids, or > > b) always random session and msg ids (4 random UUIDs fo

[sage-devel] Re: timeit for mathematicians

2011-12-14 Thread rjf
People have hit on some of the issues, e.g. (a) the algorithm + algorithm must be deterministic (no calls to "random") (b) the computation might be slow because of multiprocessing (time slots scheduled to something else) but also there are other often quite critical issues affecting timing, like:

[sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Jason Grout
On 12/14/11 2:39 PM, Volker Braun wrote: On Wednesday, December 14, 2011 8:29:53 PM UTC, jason wrote: To send an initial computation, use the following POST data sent to the /eval URL: commands: string of commands to execute session_id: make up some string identifier, it shouldn

Re: [sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Fernando Perez
On Wed, Dec 14, 2011 at 12:43 PM, Jason Grout wrote: > Feel free to CC this message over to the ipython list if you want to take up > the discussion there. Will do that. Cheers, f -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an em

[sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Jason Grout
On 12/14/11 1:57 PM, Fernando Perez wrote: At this point we have a spec in the document you pointed to, but precious little in the way of independent compliance testing, so there's a real danger of the actual implementation diverging from the specification simply by accident. Already I see it'

[sage-devel] Re: Bug when taking complement of bipartite graph?

2011-12-14 Thread fidelbc
Here it is, ticket number 12155. http://trac.sagemath.org/sage_trac/ticket/12155 > Yes, it would appear that the generic complement() method is adding > edges to a bipartite graph object and the error is coming from the > bipartite graph routines complaining about an illegitimate edge.  I > would

[sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Volker Braun
On Wednesday, December 14, 2011 8:29:53 PM UTC, jason wrote: > > To send an initial computation, use the following POST data sent to the > /eval URL: > > commands: string of commands to execute > session_id: make up some string identifier, it shouldn't matter what it is > msg_id: make up some othe

[sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Jason Grout
On 12/14/11 2:09 PM, Volker Braun wrote: On Wednesday, December 14, 2011 7:37:33 PM UTC, jason wrote: > 1) When evaluating a cell, I also get all previous responses back > (previous msg_ids). Is there a way to omit the history? You can specify a starting "sequence number" for the

[sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Volker Braun
On Wednesday, December 14, 2011 7:37:33 PM UTC, jason wrote: > > > 1) When evaluating a cell, I also get all previous responses back > > (previous msg_ids). Is there a way to omit the history? > > You can specify a starting "sequence number" for the message history. > When you get the history back

Re: [sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Fernando Perez
On Wed, Dec 14, 2011 at 11:37 AM, Jason Grout wrote: > That sounds like a great idea.  One of the last things we wanted to do > before releasing the big 1.0 version is to write more tests and > documentation about the protocol.  Things have been on hold for the last > little while (school has been

[sage-devel] Re: Questions about the single-cell server

2011-12-14 Thread Jason Grout
On 12/14/11 12:58 PM, Volker Braun wrote: Is there any specification / documentation for the JSON returned by the single-cell server? Maybe I haven't looked enough, but all I see is how to use it via the js api. For the Android app I'd like to access the server on a bit lower level. Right now I'v

[sage-devel] Re: Bug when taking complement of bipartite graph?

2011-12-14 Thread Rob Beezer
On Dec 14, 11:04 am, fidelbc wrote: > And I think the problem arises when taking complement. > > sage: g.complement() > ... > RuntimeError: Edge vertices must lie in different partitions. > > Perhaps the complement is constructed as a bipartite graph too, which > is not true in general. Yes, it w

Re: [sage-devel] Missing digits in numerical_approx

2011-12-14 Thread William Stein
2011/12/14 Jérôme Tremblay : > Using n() sometimes returns the wrong number of digits > > This is correct: > > sage: a = n(golden_ratio, digits=5000) > sage: len(str(a)) > 5001 > > This is not: > > sage: a = n(golden_ratio, digits=500) > sage: len(str(a)) > 489 > > Any clue? My first guess

Re: [sage-devel] Memory Leaks in #6371?

2011-12-14 Thread Chris Swierczewski
> Change your code so the actual Riemann theta module isn't imported > until a users actually wants to use it (e.g. use lazy_import). Then > it won't trigger an issue with all.py at startup. This is also > generally a good idea to keep from further impacting Sage's startup > time. > Thanks for

Re: [sage-devel] Memory Leaks in #6371?

2011-12-14 Thread William Stein
On Wed, Dec 14, 2011 at 10:25 AM, Chris Swierczewski wrote: > I've finished with an implementation of Riemann theta functions in Sage. > (See patch #6371.) Unfortunately, as shown at the bottom of the comment > thread for #6371, my code seems to be introducing memory leaks. The culprit > doctest f

[sage-devel] Bug when taking complement of bipartite graph?

2011-12-14 Thread fidelbc
Hi all, I'm running sage 4.7.2. While trying the matching polynomial function for graphs I found the following sage: g=graphs.CompleteBipartiteGraph(3,3) sage: g.matching_polynomial() ... RuntimeError: Edge vertices must lie in different partitions. After reading the documentation I tried sage:

[sage-devel] Questions about the single-cell server

2011-12-14 Thread Volker Braun
Is there any specification / documentation for the JSON returned by the single-cell server? Maybe I haven't looked enough, but all I see is how to use it via the js api. For the Android app I'd like to access the server on a bit lower level. Right now I've just hacked something together, but it

[sage-devel] Memory Leaks in #6371?

2011-12-14 Thread Chris Swierczewski
I've finished with an implementation of Riemann theta functions in Sage. (See patch #6371 .) Unfortunately, as shown at the bottom of the comment thread for #6371, my code seems to be introducing memory leaks. The culprit doctest failure is in sag

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Fernando Perez
On Wed, Dec 14, 2011 at 10:11 AM, Harald Schilly wrote: > Nice plots of it are > called box-plots. This captures everything more accurately than the > min/mean/sd scheme. (The reason why quantiles aren't used that much in > the past is just that sorting is much harder than sum+division.) A nice s

[sage-devel] Re: Sage Android App

2011-12-14 Thread Rob Beezer
On Dec 13, 11:21 pm, William Stein wrote: > Another thing I noticed about Android is that a *lot* of apps have two > version: one free with ads, and another that is non-free but with no > ads. Yep, I'd forgotten about ads. "Ad-supported" + "donate" sounds like one possible way to go. And I'm gl

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Harald Schilly
On Wed, Dec 14, 2011 at 19:06, Martin Albrecht wrote: > I should mention that we do test random matrices and that some of our > algorithms depend on the input (e.g., they are rank sensitive). So perhaps at > least for some tests we run, it makes a bit of sense?  But we should at least > also outpu

Re: [sage-devel] Re: Missing digits in numerical_approx

2011-12-14 Thread D. S. McNeil
I think problems caused by the log(10,2) ~ 3.32192 assumption occur in several places throughout Sage, and it's the source of at least one bug report (http://trac.sagemath.org/sage_trac/ticket/10164). The following all look suspicious to me: misc/functional.py:prec = int((digits+1) *

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Martin Albrecht
On Wednesday 14 December 2011, Volker Braun wrote: > On Wednesday, December 14, 2011 12:18:58 AM UTC, Martin Albrecht wrote: > > It uses the "Student-t" method to estimate the certainty > > This is precisely what the python documentation warns about (see Nils' > post). The timings are not normal d

Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Harald Schilly
On Wednesday, December 14, 2011 2:36:24 AM UTC+1, Volker Braun wrote: > The timings are not normal distributed. Yes, I just wanted to add the same. mean and standard deviation only made sense if you have a normal distribution. This t-test martin mentioned only checks if the assumption about t

[sage-devel] Re: Missing digits in numerical_approx

2011-12-14 Thread Harald Schilly
Via "n??" I looked at the code. There is a line prec = int((digits+1) * 3.32192) + 1 where the 3.32… is an approximation to log_2(10). I highly suspect that's the source of it. Make the trailing 2 a 3 and it should give you more than the requested number of digits. sage: n(log(10,2), prec=100) 3

[sage-devel] Missing digits in numerical_approx

2011-12-14 Thread Jérôme Tremblay
Using n() sometimes returns the wrong number of digits This is correct: sage: a = n(golden_ratio, digits=5000) sage: len(str(a)) 5001 This is not: sage: a = n(golden_ratio, digits=500) sage: len(str(a)) 489 Any clue? Jerome Tremblay LaCIM, UQAM -- To post to this group, send an ema

Re: [sage-devel] Re: timeit for mathematicians

2011-12-14 Thread William Stein
On Dec 14, 2011 12:40 AM, "Nils Bruin" wrote: > > On Dec 13, 11:27 pm, William Stein wrote: > > At least since we're mathematically savvy, we know that there's a lot > > more to statistics than the normal distribution. > > > > Having never seen any timing distributions (since they are hidden by >

Re: [sage-devel] Re: [sage-windows] Re: Cygwin attempt with sage-4.8.alpha3

2011-12-14 Thread Karl-Dieter Crisman
On Sun, Dec 4, 2011 at 4:12 AM, Jason wrote: > On Sunday 04 December 2011 08:50:21 Volker Braun wrote: >> When I tracked down the yasm bug I made a trac ticket at >> http://trac.sagemath.org/sage_trac/ticket/11844 >> >> On Saturday, December 3, 2011 11:54:03 PM UTC, jason wrote: >> > > This look l

[sage-devel] Re: strange ECL RunTimeError when integrating

2011-12-14 Thread Nils Bruin
On Dec 13, 6:38 pm, kcrisman wrote: > Yikes!   So we wouldn't want > > sage: integrate(1.0*x,x,0,2) > 2 > > to work any more?  (Pace the error messages below.) > > Could we not instead try to catch this kind of error and recommend to > the user that they use rationals?  Or something... well, we *

[sage-devel] Re: Sage Android App

2011-12-14 Thread Volker Braun
An in-app donation button would be easy to set up, I think. This would also be my preferred setup for an "official" Sage app, GPL + donation with whatever amount the user is comfortable with. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this grou

[sage-devel] Re: Mathematica/Magma/Sage dictionaries ?

2011-12-14 Thread kcrisman
> > For a start, you could try looking at the files mathematica.py and magma.py > > (etc.) in SAGE_ROOT/devel/sage/sage/ > > interfaces/.  If you have a bunch of Mathematica code and want to convert it > > to Sage, it looks like you could try commands like > > >     sage: m = mathematica('

[sage-devel] Re: Sage Android App

2011-12-14 Thread kcrisman
> Regarding Sage, I personally agree with Rob -- culture or not, > whatever we make available should be free and GPL'd, but we can make a > "donate" version too. Hence my comment, "or at least making a contribution possible to do". Volker, would this be hard to set up, assuming you think your/ H

[sage-devel] Re: strange ECL RunTimeError when integrating

2011-12-14 Thread achrzesz
On 14 Gru, 04:36, Dan Drake wrote: > On Tue, 13 Dec 2011 at 06:38PM -0800, kcrisman wrote: > > > Proposed bugfix: symbolic integration should reject floats. > > > Yikes!   So we wouldn't want > > > sage: integrate(1.0*x,x,0,2) > > 2 > > > to work any more?  (Pace the error messages below.) > > >

[sage-devel] Re: timeit for mathematicians

2011-12-14 Thread Nils Bruin
On Dec 13, 11:27 pm, William Stein wrote: > At least since we're mathematically savvy, we know that there's a lot > more to statistics than the normal distribution. > > Having never seen any timing distributions (since they are hidden by > timeit), I don't even know anything about how timings are

Re: [sage-devel] Re: Mathematica/Magma/Sage dictionaries ?

2011-12-14 Thread Rajeev Singh
On Wed, Dec 14, 2011 at 7:55 AM, John H Palmieri wrote: > > > On Tuesday, December 13, 2011 3:51:19 PM UTC-8, Nathann Cohen wrote: >> >> Hello everybody !!! >> >> I have been contacted by an enlightened colleague who planned to teach a >> bit of Sage at the local university, instead of Magma and M