[sage-devel] Weird looking representation of quotients of radicals

2012-03-08 Thread Javier López Peña
Using sage 5.0 beta 7: sage: 1/sqrt(2) 1/2*sqrt(2) This is mathematically correct when taken to mean (by precedence of operators) (1/2)*sqrt(2) personally I find it confusing, and many of my students (who don't know the first thing about precedence orders) took it to mean 1/(2*sqrt(2)) with

Re: [sage-devel] Re: upgrade of networkx spkg (to get Bellman-Ford algorithm)

2012-06-13 Thread Javier López Peña
The failing tests in graph.py are due to a minor API change in the betweenness_centrality function. They get fixed by replacing {{{ return networkx.betweenness_centrality(self.networkx_graph(copy=False), normalized) }}} in line 3252 of SAGE_ROOT/devel/sage-main/sage/graphs/graph.py by {{{

[sage-devel] On the NetworkX upgrade: vote required

2012-06-14 Thread Javier López Peña
Hi all, I am working on the failing doctest to upgrade our almost 2 year old NetworkX 1.2 to NetworkX 1.6 (see #12806, [1]) I have sorted out the doctest failures in graph.py and digraph.py; in order to solve the ones in generic_graph.py there is some design decision that needs to be made. The

[sage-devel] Re: On the NetworkX upgrade: vote required

2012-06-14 Thread Javier López Peña
> > I don't think this should be a problem, but current policy is to first >> deprecate it for a while (usually I've heard one year, see also #13109 for >> something that will hopefully work in the future). Presumably you can >> change the backend but still return the weights for now, and make

[sage-devel] Re: On the NetworkX upgrade: vote required

2012-06-14 Thread Javier López Peña
On Thursday, June 14, 2012 3:27:41 PM UTC+1, jason wrote: > > So, to be clear, the new networkx function does not give you as much > information as the old one? Yes, that is the case. The (weighted) clustering coefficient algorithm (with weighted *edges*) computes some auxiliary *vertex* wei

[sage-devel] Re: On the NetworkX upgrade: vote required

2012-06-14 Thread Javier López Peña
On Thursday, June 14, 2012 3:39:23 PM UTC+1, Javier López Peña wrote: > > Yes, that is the case. The (weighted) clustering coefficient algorithm > (with weighted *edges*) > computes some auxiliary *vertex* weights. The old method used to return > all of it, the new one >

[sage-devel] Re: On the NetworkX upgrade: vote required

2012-06-14 Thread Javier López Peña
Done. Patch is ready for review at http://trac.sagemath.org/sage_trac/ticket/12806 Cheers, J -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at htt

[sage-devel] Re: Boolean functions / propositional logic

2012-06-15 Thread Javier López Peña
Hi Nicolas! You might want to review #418 then ;-) http://trac.sagemath.org/sage_trac/ticket/418 On Friday, June 15, 2012 10:25:57 PM UTC+1, Nicolas M. Thiéry wrote: > > Dear all, > > I discussed yesterday with Shalom Eliahou and some other persons that > could be interested in using S

[sage-devel] Re: sip package - optional or experimental

2012-06-17 Thread Javier López Peña
Hi Volker, the qmake path can be /usr/bin/qmake if installed from the dmg package or /opt/local/bin/qmake if installed from macports. In either case it should be in the user path if it was properly installed. I built your package without problems using both versions of qmake (see my remark on t

[sage-devel] Re: Optional BeautifulSoup spkg

2012-06-26 Thread Javier López Peña
I am all for having data-scrapping tools easily available, but is there any actual advantage on having an spkg rahter than using easy_install, or is it just for the convenience of the sws2rst conversion? That being said, why make the spkg with BS3 rather than BS4? I believe BS4 breaks some back

Re: [sage-devel] Re: GL( N,GF(p) ).random_element() is slow

2012-07-03 Thread Javier López Peña
I know little of random methods, but do we really need to make things so complicated? As the OP suggests, we might as well just generate matrices uniformly at random and discard if not invertible. The set of invertible matrices is Zariski open, so the probability of hitting a non-invertible mat

Re: [sage-devel] Re: GL( N,GF(p) ).random_element() is slow

2012-07-03 Thread Javier López Peña
On Tuesday, July 3, 2012 10:53:23 AM UTC+1, Dima Pasechnik wrote: > > well, it's not that small, especially for finite fields. E.g. for F_2 and > n=3, one only gets 168 invertible matrices out of 512=2^9 in total... > (I can't resist saying that the order of GL(n,q) is > (q^n-1)(q^{n-1}-1)...(q

Re: [sage-devel] Re: GL( N,GF(p) ).random_element() is slow

2012-07-03 Thread Javier López Peña
Hi Robert, On Tuesday, July 3, 2012 5:21:53 PM UTC+1, Robert Bradshaw wrote: > > You don't have to re-generate the entire matrix, you could likely get > away with changing one random element at a time. (And if you did so, > perhaps computing the rank would be cheaper). Still, +1 to it's much >

Re: [sage-devel] Re: GL( N,GF(p) ).random_element() is slow

2012-07-04 Thread Javier López Peña
On Tuesday, July 3, 2012 9:19:50 PM UTC+1, Robert Bradshaw wrote: > > You're right, one does want to ensure that there's a high probability > of changing its rank. One could also change O(n) entries (one on each > row/column) rather than all O(n^2). This will have a larger impact for > large fi

[sage-devel] Easy review needed for #12806

2012-07-04 Thread Javier López Peña
Hi guys, ticket 12806, upgrading 2 year old networkx 1.2 to version 1.6, needs an extra review. The technical part was already positively reviewed by Keshav Kini, but Jeroen pointed out a docbuild failure due to a tex error. I patched the problem, and now need a new review. The patch consists

[sage-devel] Re: Please test sage-5.1.rc1

2012-07-07 Thread Javier López Peña
Compiled and long tests pass in OS-X Snow Leopard 10.6.8 J On Friday, July 6, 2012 8:05:28 AM UTC+1, Jeroen Demeyer wrote: > > Because many of the Sage testing machines (redhawk and all of Skynet) > are down, version sage-5.1.rc1 has been tested much less than usual. > > So, please build sage-

Re: [sage-devel] Re: Code duplication and aliases in methods

2012-07-09 Thread Javier López Peña
On Monday, July 9, 2012 2:59:33 AM UTC+1, Birk Eisermann wrote: > > (I have searched and found that there has been discussion on how much > networkx will be adapted in sage - and it seems that there is some issue > with the license... right? I also read the sage-devel thread "graph > theory: ref

[sage-devel] Re: import / export of graphs (modifications in graph theory)

2012-07-09 Thread Javier López Peña
Why cannot we have our cake and eat it too? Isn't there a way to have the import/export classes in a separate file that gets imported inside an import/export alias in the graph class so that G.export is actually GraphExporter(G, whatever) and tab completion works? Partially related, ticket #9

Re: [sage-devel] sagemath-monolithic PPA on launchpad

2012-07-13 Thread Javier López Peña
On Friday, July 13, 2012 1:53:00 PM UTC+1, Jan Groenewald wrote: > > Can you build using "make -k" instead of "make"? This will make the >> build continue after errors (but it will still respect dependencies). >> > > No idea how. Our rules file say to run: > > > > 0 > jan@snapperkob:~/src/sagem

Re: [sage-devel] sagemath-monolithic PPA on launchpad

2012-07-13 Thread Javier López Peña
On Friday, July 13, 2012 2:00:36 PM UTC+1, Javier López Peña wrote: > > Maybe I am saying something stupid here, but cannot you just change the > first line to this? > #!/usr/bin/make -f -k > Sorry, that should be #!/usr/bin/make -k -f -- -- To post to this group, send a

Re: [sage-devel] Re: Matrix groups from GAP

2012-07-19 Thread Javier López Peña
I understand that from some point of view mixing groups and their representations is a bad idea, but many groups are naturally defined as transformation groups and using a matrix presentation is just as natural as describing them by permutations, or even more so. Not to mention the huge size som

Re: [sage-devel] Re: Matrix groups from GAP

2012-07-19 Thread Javier López Peña
On Thursday, July 19, 2012 9:52:26 AM UTC+1, Dima Pasechnik wrote: > > let me nitpick first by saying that in group theory > "presentation" means "presentation by generators and > relations" whereas you mean a (linear) "representation". > Fine, maybe I should have use "realization" or "imploement

Re: [sage-devel] Re: Proposed Project

2012-07-25 Thread Javier López Peña
You think you have it bad? Look at who the other Javier López Peña is: http://en.wikipedia.org/wiki/Francisco_Javier_L%C3%B3pez_Pe%C3%B1a when this guy hit the news I received hate mail on a daily basis for almost a year :-/ On Wednesday, July 25, 2012 9:31:29 AM UTC+1, John Cremona wrote

[sage-devel] Re: An example in Stein's "Three lectures..."

2012-07-25 Thread Javier López Peña
There is a (sort of new) fast probabilistic algorithm for computing Galois groups, due to Nikolai Durov: - N. V. Durov, Computation of the Galois group of a polynomial with rational coefficients. I. (Russian) Zap. Nauchn. Sem. S.-Peterburg. Otdel. Mat. Inst. Steklov. (POMI) 31

[sage-devel] Re: Attribute errors with polynomials

2013-01-04 Thread Javier López Peña
Hi Nathan, What do you mean by calling absolute value or norm of a polynomial? Why should these methods even be defined? Cheers, J On Friday, January 4, 2013 1:50:14 PM UTC, Nathann Cohen wrote: > > Hell everybody !!! > > Of course I do not know if what I do has any meaning, but I sti

[sage-devel] Re: Wrapping gap.IsConjugate

2013-01-31 Thread Javier López Peña
Hi Jori, there are indeed many GAP method that are not exposed to the sage library. A while back I wrote a wrapper for (some) conjugacy classes methods: http://trac.sagemath.org/sage_trac/ticket/7886 My approach (suggested by N. Thiery) was to create two different classes, a generic one for fal

Re: [sage-devel] Re: Wrapping gap.IsConjugate

2013-02-01 Thread Javier López Peña
On Friday, February 1, 2013 11:41:40 AM UTC, jori.ma...@uta.fi wrote: > If I understand correctly, after conjugacy_class(self, g) is done it needs > only say conjugacy_class(self, g1)==conjugacy_class(self, g2) to check if > two groups are conjugates. (But still, for convenience there should be

Re: [sage-devel] Re: Wrapping gap.IsConjugate

2013-02-05 Thread Javier López Peña
On Friday, February 1, 2013 1:03:55 PM UTC, jori.ma...@uta.fi wrote: > Should Sage aim to efficient code whenever something is added, or should > we just put in something that works and lock "user interface", i.e. > command or function name, order of arguments etc? > I don't think we have to c

[sage-devel] Re: Spanish speaking reviewer needed

2013-02-19 Thread Javier López Peña
I'll give it a look Cheers, J On Tuesday, February 19, 2013 12:40:16 AM UTC, Keshav Kini wrote: > > Hi, > > If there are any Spanish speaking Sage devs who have a little time, > could you please review this Spanish translation of the sagenb UI? > > https://github.com/sagemath/sagenb/pull/133

[sage-devel] Tab completion in sage 5.7

2013-02-26 Thread Javier López Peña
With latest stable sage 5.7 (running under Mac OS 10.6.8) I have observed a new behavior with tab-completion. Trying to launch the notebook, tab completion keeps showing me two choices, one of them a "magic" one: sage: note %notebook notebook Is this a new intended behavior? I would only expe

[sage-devel] Re: A problem with exceptions in cached functions

2013-03-20 Thread Javier López Peña
On Wednesday, March 20, 2013 5:09:40 AM UTC, Nils Bruin wrote: > On Mar 19, 9:10 pm, Robert Bradshaw > wrote: > > Sounds good. What if we called this foo.uncached(args) instead (which > > is more verbose but much clearer, and tab completion shouldn't make > > that too bad...) I could make cac

Re: [sage-devel] Matplotlib and sage's python

2013-05-22 Thread Javier López Peña
On Wednesday, May 22, 2013 7:30:07 AM UTC+1, Snark wrote: > Is there a non-default and easy way to get a working > matplotlib-on-bare-python? > Depending on your operating system getting matplotlib working over system python can be quite a tricky task, IIRC on Mac OSX 10.6 you must install so

[sage-devel] Re: R

2013-11-22 Thread Javier López Peña
On Thursday, November 21, 2013 1:50:07 PM UTC, Volker Braun wrote: > > ... but there is very little that we currently can do to replace R > functionality. Having said that, there is a serious lack of statistics in > Sage. > In my personal experience the pandas package [1] is capable of doing mos

Re: [sage-devel] Re: Python as build-time dependency

2014-01-11 Thread Javier López Peña
On Saturday, January 11, 2014 4:37:56 PM UTC, William wrote: > > Andrew's main argument is that there is strong interesting in writing > a nontrivial new build system that solves our unique set of problems > with Sage (since no existing build system does). > I am not qualified to discuss the

Re: [sage-devel] Re: Python as build-time dependency

2014-01-12 Thread Javier López Peña
On Sunday, January 12, 2014 2:20:03 AM UTC, William wrote: > > Thanks for reminding people of conda. One issue is that Sage's build > system is far more than just for installing Python package -- it's > much, much more (e.g., Gap, Singular, etc.). > conda started off as a python package manag

[sage-devel] Re: cached_function: cache a(n) only when n is *not* a prime power

2014-05-15 Thread Javier López Peña
You can make a caching function that returns a decorator depending on your condition, that you subsequently apply to your function: def conditional_caching(condition): def decorator(f): cache = {} def cached_f(n): if n in cache: return cache[n]

Re: [sage-devel] Re: cached_function: a filter to only cache some inputs ?

2014-05-15 Thread Javier López Peña
If an method is *extremely* performance critical, one might want to give it its own custom cache to avoid as much overhead as possible. I don't think the utility cached_function and cached_method can be expected to have shining performance for all types of functions and inputs. Also, if one nee