[sage-devel] Re: recent woes with relocation of SageMath installation directory

2016-02-05 Thread Jan Groenewald
A fixed version (you can run sagemath-upstream-binary without the -full) is now busy copying from the dev PPA to the stable PPA. 7.0~aimsppa1~qa201602060140061 Regards, Jan On 3 February 2016 at 17:46, Jan Groenewald wrote: > Hi > > TL;DR install sagemath-upstream-binary-full for a fix. The er

[sage-devel] advice needed for what to do in subscheme polynomial morphism initialization

2016-02-05 Thread Ben Hutz
I'm working on an issue with initialization of affine and projective morphisms over subschemes (Trac #20018). In looking at this I've uncovered a sticky issue that I'm not sure what the right fix is. Essentially, over a subscheme the coordinate ring is a quotient ring. Thus, when initializing t

[sage-devel] no 7.0 binary for mac

2016-02-05 Thread Andrew Pennebaker
The SageMath homepage seems to say that v7.0 is available: http://www.sagemath.org/ But when I try to download the binary for Mac OS X, no download is listed for 7.0, just 6.10. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe fro

[sage-devel] infinite recursion error during sage compilation

2016-02-05 Thread Andrew Pennebaker
After `brew cask install sage`, the resulting sage install complains that it didn't compile properly. $ brew cask install sage ... $ sage RuntimeError: maximum recursion depth exceeded during compilation ┌┐ │ SageMath Version 6.

Re: [sage-devel] is_prime failing silently

2016-02-05 Thread Travis Scrimshaw
On Friday, February 5, 2016 at 3:29:29 PM UTC-6, Jeroen Demeyer wrote: > > On 2016-02-05 19:59, William Stein wrote: > > Maybe is_prime for field elements should just raise an exception? > > This reminds me very much about the recent discussion we had about floor > division... and which didn't

[sage-devel] Log in to the wiki

2016-02-05 Thread Thierry
Hi, i re-established the connection between trac and the wiki so that it is now possible to log in to the wiki with your trac login/password. Ciao, Thierry -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop r

[sage-devel] Re: Failure to Compile Sage 7.0 Stable on openSUSE Linux

2016-02-05 Thread Dima Pasechnik
On Friday, 5 February 2016 19:34:47 UTC, Martin Vahi wrote: > > > > neljapäev, 4. veebruar 2016 20:30.12 UTC kirjutas Dima Pasechnik: > ... > >> In a working build one will see >> "checking whether we can use the existing Boehm-Weiser library ... yes" >> rather than 'no' >> ... >> > > Thank You

Re: [sage-devel] is_prime failing silently

2016-02-05 Thread Jeroen Demeyer
On 2016-02-05 19:59, William Stein wrote: Maybe is_prime for field elements should just raise an exception? This reminds me very much about the recent discussion we had about floor division... and which didn't really come to a conclusion. It's really the same problem: you have something whic

Re: [sage-devel] is_prime failing silently

2016-02-05 Thread Jeroen Demeyer
On 2016-02-05 20:45, Vincent Delecroix wrote: About the code, the current version is {{{ def is_prime(n): try: return n.is_prime() except (AttributeError, NotImplementedError): return ZZ(n).is_prime() }}} I think that we should change it to {{{ from sage.structure.c

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nathann Cohen
Dear Nils, Ddo not doubt that you and I (and everybody else) agrees that the current behaviour of subs (*) is the desired behaviour. This discussion is about the obvious cases where **kwargs is wrongly used, e.g. in Matrix. I saw it happen in many places already. I even saw this one: def a_f

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nils Bruin
On Friday, February 5, 2016 at 12:46:54 PM UTC-8, Nathann Cohen wrote: > > > Well, the call syntax for polynomials and symbolic expressions really > > benefits from arbitrary keywords. > > Yeah, I guess there is nothing wrong with > "an_expression.subs(whatever=4)" returning nothing even though

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nathann Cohen
> Well, the call syntax for polynomials and symbolic expressions really > benefits from arbitrary keywords. Yeah, I guess there is nothing wrong with "an_expression.subs(whatever=4)" returning nothing even though 'whatever' is not a variable appearing in an_expression. Nathann -- You received t

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nils Bruin
On Friday, February 5, 2016 at 10:23:17 AM UTC-8, Nathann Cohen wrote: > > > I suppose you meant to add a third rule > > 3) In any branch where a **kwargs -taking function does not call > another > > function it forwards the **kwargs argument to, it must raise an error if > any > > unrecog

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nathann Cohen
> In general, though, I think it's worth emphasizing **kwargs incurs a dict > copy anyway. That means that the difference in cost of calling signatures > def f(a=optional,**kwargs) versus def f(**kwargs) is not as big as you might > initially guess. I suspect that the verbosity of the former might

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nils Bruin
On Friday, February 5, 2016 at 10:20:22 AM UTC-8, Volker Braun wrote: > > Passing the keywords down individually also incurs some overhead, plus we > are talking about fairly small dicts. Its unlikely to be of a performance > concern IMHO > > As Travis noted, Python *always* makes a shallow copy

Re: [sage-devel] Re: Failure to Compile Sage 7.0 Stable on openSUSE Linux

2016-02-05 Thread Thierry
Hi, On Fri, Feb 05, 2016 at 11:34:47AM -0800, Martin Vahi wrote: [...] > Since I'm not a Sage developer, that concludes this bug report for me. I > wonder, if it should be re-written to some bug-track or something > similar? I've read that there's quite a specific procedure for filing > those repo

Re: [sage-devel] is_prime failing silently

2016-02-05 Thread William Stein
On Fri, Feb 5, 2016 at 9:50 AM, David Wong wrote: > prime_number = bignumber / 2 > is_prime(prime_number) # -> False > > prime_number = bignumber // 2 > is_prime(prime_number) # -> True > > prime_number = ZZ(bignumber / 2) > is_prime(prime_number) # -> True > > > I've spent a couple of days arguin

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Jori Mäntysalo
On Fri, 5 Feb 2016, Nathann Cohen wrote: I object. It is a *very* simple mistake that has a *very* simple solution: Any function that takes **kwargs as argument must: 1) Remove from kwargs all values it understands 2) Forward the remaining content of kwargs to a subfunction Th

Re: [sage-devel] is_prime failing silently

2016-02-05 Thread Vincent Delecroix
About the code, the current version is {{{ def is_prime(n): try: return n.is_prime() except (AttributeError, NotImplementedError): return ZZ(n).is_prime() }}} I think that we should change it to {{{ from sage.structure.coerce import py_scalar_to_element def is_prime(n):

Re: [sage-devel] Getting reminders for tickets in needs_work

2016-02-05 Thread Samuel Lelievre
2016-02-05 10:13:28 Z, Jori Mäntysalo: > > On Fri, 5 Feb 2016, Jeroen Demeyer wrote: > > > 1. The e-mail goes only to the author(s) of the ticket, not to all > people > > cc'ed in that ticket. > > To all cc'ed people would not be too much, assuming we could have real > un-cc -possibility. Bu

[sage-devel] Re: Failure to Compile Sage 7.0 Stable on openSUSE Linux

2016-02-05 Thread Martin Vahi
neljapäev, 4. veebruar 2016 20:30.12 UTC kirjutas Dima Pasechnik: ... > In a working build one will see > "checking whether we can use the existing Boehm-Weiser library ... yes" > rather than 'no' > ... > Thank You for the answer. My interpretation of it is that the flaw within the Sage is t

Re: [sage-devel] is_prime failing silently

2016-02-05 Thread William Stein
On Fri, Feb 5, 2016 at 11:24 AM, Bruno Grenet wrote: > Note that there is a difference between the example in the original email > and the answers: The original email was about is_prime(something) not > something.is_prime(). I do not know the mechanisms behind > is_prime(something) but would it be

Re: [sage-devel] is_prime failing silently

2016-02-05 Thread Bruno Grenet
Note that there is a difference between the example in the original email and the answers: The original email was about is_prime(something) not something.is_prime(). I do not know the mechanisms behind is_prime(something) but would it be possible that in this case the behavior is slightly differ

Re: [sage-devel] is_prime failing silently

2016-02-05 Thread William Stein
On Friday, February 5, 2016, David Roe wrote: > > > On Fri, Feb 5, 2016 at 1:20 PM, Vincent Delecroix < > 20100.delecr...@gmail.com > > wrote: > >> Hello, >> >> Indeed, the definition given in the documentation of "is_prime" does not >> coincide with what the method is doing. >> >> The mathematic

Re: [sage-devel] is_prime failing silently

2016-02-05 Thread David Roe
On Fri, Feb 5, 2016 at 1:20 PM, Vincent Delecroix <20100.delecr...@gmail.com > wrote: > Hello, > > Indeed, the definition given in the documentation of "is_prime" does not > coincide with what the method is doing. > > The mathematical definition of prime *depends* on the ring. An element of > a ri

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nathann Cohen
> I suppose you meant to add a third rule > 3) In any branch where a **kwargs -taking function does not call another > function it forwards the **kwargs argument to, it must raise an error if any > unrecognized kwargs are left. I thought about it for a moment, and wondered if there was any sit

Re: [sage-devel] is_prime failing silently

2016-02-05 Thread Vincent Delecroix
Hello, Indeed, the definition given in the documentation of "is_prime" does not coincide with what the method is doing. The mathematical definition of prime *depends* on the ring. An element of a ring is prime if the ideal it generates is prime. And the ideal (3) is prime in ZZ but not in QQ

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Volker Braun
On Friday, February 5, 2016 at 6:47:19 PM UTC+1, Nils Bruin wrote: > > Note that this solution comes as a fairly significant penalty: you end up > copying/modifying the kwargs argument *all the time*. > Passing the keywords down individually also incurs some overhead, plus we are talking about f

[sage-devel] is_prime failing silently

2016-02-05 Thread David Wong
prime_number = bignumber / 2 is_prime(prime_number) # -> False prime_number = bignumber // 2 is_prime(prime_number) # -> True prime_number = ZZ(bignumber / 2) is_prime(prime_number) # -> True I've spent a couple of days arguing with people about a number (not) being a prime. Turns out it fails

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Travis Scrimshaw
> > I suppose you meant to add a third rule > 3) In any branch where a **kwargs -taking function does not call > another function it forwards the **kwargs argument to, it must raise an > error if any unrecognized kwargs are left. > > Note that this solution comes as a fairly significant pena

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nils Bruin
On Friday, February 5, 2016 at 9:08:45 AM UTC-8, Nathann Cohen wrote: > > > Yes, this is a more universal problem in the UI: > > I object. It is a *very* simple mistake that has a *very* simple solution: > > Any function that takes **kwargs as argument must: > 1) Remove from kwargs a

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Volker Braun
On Friday, February 5, 2016 at 6:08:45 PM UTC+1, Nathann Cohen wrote: > > Any function that takes **kwargs as argument must: > 1) Remove from kwargs all values it understands > 2) Forward the remaining content of kwargs to a subfunction > And: 3) Doctest that an unknown arg

Re: [sage-devel] How are number field elements sorted?

2016-02-05 Thread Nils Bruin
On Friday, February 5, 2016 at 4:05:22 AM UTC-8, John Cremona wrote: > > Understood. I thought that a total order was implemented for number > field elements, but looking in the code I could not even find the > relevant _cmp_ function! > It's there, but indeed it doesn't implement a total orde

Re: [sage-devel] Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Jeroen Demeyer
On 2016-02-05 15:43, Nathann Cohen wrote: sage: Matrix(whatever=58) [] I just created http://trac.sagemath.org/ticket/20015 for this -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving ema

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Jeroen Demeyer
On 2016-02-05 18:08, Nathann Cohen wrote: Yes, this is a more universal problem in the UI: I object. It is a *very* simple mistake that has a *very* simple solution: Any function that takes **kwargs as argument must: 1) Remove from kwargs all values it understands Or just not u

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nathann Cohen
In particular, we cannot consider each function with such a bug to be 'just an instance of a more general problem'. They have to be fixed one by one, especially when the function involved is perhaps the most common constructor function new users will call. There was some talk here of making Sage m

Re: [sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nathann Cohen
> Yes, this is a more universal problem in the UI: I object. It is a *very* simple mistake that has a *very* simple solution: Any function that takes **kwargs as argument must: 1) Remove from kwargs all values it understands 2) Forward the remaining content of kwargs to a subf

[sage-devel] Re: Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nils Bruin
On Friday, February 5, 2016 at 6:43:38 AM UTC-8, Nathann Cohen wrote: > > Let me add to that: > > sage: Matrix(whatever=58) > [] > Yes, this is a more universal problem in the UI: it's quite common that unknown keywords just get pass through, usually because they might be of use for a

[sage-devel] Output of Matrix.plot() depends on whether the Matrix is sparse of dense

2016-02-05 Thread Nathann Cohen
Hello everybody, I am writing here to share an inconsistency with the behaviour of Matrix.plot: When M is sparse: M.plot() shows which entries of M are nonzero. When M is dense: M.plot() shows M with colors representing the value of each cell. Let me add to that: sage: Matrix(whate

Re: [sage-devel] How are number field elements sorted?

2016-02-05 Thread John Cremona
On 5 February 2016 at 12:04, John Cremona wrote: > Understood. I thought that a total order was implemented for number > field elements, but looking in the code I could not even find the > relevant _cmp_ function! I think it is possible that the clever code people have written to implement order

Re: [sage-devel] How are number field elements sorted?

2016-02-05 Thread John Cremona
Understood. I thought that a total order was implemented for number field elements, but looking in the code I could not even find the relevant _cmp_ function! John On 5 February 2016 at 11:49, Nathann Cohen wrote: > If the default comparison on your objects is not a total order there > is no gu

Re: [sage-devel] How are number field elements sorted?

2016-02-05 Thread Nathann Cohen
If the default comparison on your objects is not a total order there is no guarantee that the output of a sorting algorithm (name any that you know) will give you a unique output. sage: sorted([{1,2},{3,4}]) [{1, 2}, {3, 4}] sage: sorted([{3,4},{1,2}]) [{3, 4}, {1, 2}] Which comes

[sage-devel] How are number field elements sorted?

2016-02-05 Thread John Cremona
I have two lists of 6 (relative) number field elements: they are the same up to a permutation, as revealed by turning each into a set, but the do not sort to the same list! sage: type(L1) sage: type(L2) sage: type(L1[0]) sage: type(L2[0]) sage: len(L1)==len(L2)==6 True sage: L1==L2 False sag

Re: [sage-devel] Getting reminders for tickets in needs_work

2016-02-05 Thread Jori Mäntysalo
On Fri, 5 Feb 2016, Jeroen Demeyer wrote: 1. The e-mail goes only to the author(s) of the ticket, not to all people cc'ed in that ticket. To all cc'ed people would not be too much, assuming we could have real un-cc -possibility. But now you can not throw a comment and later get out of ticket

Re: [sage-devel] Getting reminders for tickets in needs_work

2016-02-05 Thread Nathann Cohen
> What did I request that you cannot do regarding "spkg-src"? I am still in > favour of improving spkg-src. Oh, Right. It seems that I actually accepted all your requests on this ticket. Crazy. Either way Volker will never let it pass, so let's give this up. Don't you want to do something with th

Re: [sage-devel] Getting reminders for tickets in needs_work

2016-02-05 Thread Jeroen Demeyer
On 2016-02-05 10:49, Nathann Cohen wrote: I'll just add this thing on the heap on which I store the ideas you oppose by requesting things I cannot do, with the "Testing CPLEX/Maple/Matlab" and "spkg-src" tickets. What did I request that you cannot do regarding "spkg-src"? I am still in favour

Re: [sage-devel] Getting reminders for tickets in needs_work

2016-02-05 Thread Nathann Cohen
> Fine for me, provided that > > 1. The e-mail goes only to the author(s) of the ticket, not to all people > cc'ed in that ticket. > 2. The e-mail gets sent a finite number of times per ticket (say, once after > 1 month and once after 6 months). I don't know how to guess a ticket's author, especia

Re: [sage-devel] Getting reminders for tickets in needs_work

2016-02-05 Thread Jeroen Demeyer
On 2016-02-05 10:26, Nathann Cohen wrote: There many useful trac reports which can be used instead of this, for example http://trac.sagemath.org/report/57 is what you want I guess. This only works if everybody checks that page regularly, which is not the case. Hell, even getting a message if a

Re: [sage-devel] Re: error rebuilding sage

2016-02-05 Thread Clemens Heuberger
On 2016-02-04 23:25, Dima Pasechnik wrote: > > > On Thursday, 4 February 2016 21:00:03 UTC, jhonrubia6 wrote: > > How do I know the version of a given ticket which needs review? > > > typically for reviewing you don't even want to know, just merge over the > current > develop branch. > (o

Re: [sage-devel] Getting reminders for tickets in needs_work

2016-02-05 Thread Nathann Cohen
> There many useful trac reports which can be used instead of this, for > example http://trac.sagemath.org/report/57 is what you want I guess. This only works if everybody checks that page regularly, which is not the case. Hell, even getting a message if a ticket in needs_work has not been touched

Re: [sage-devel] Re: error rebuilding sage

2016-02-05 Thread Jeroen Demeyer
On 2016-02-04 22:00, jhonrubia6 wrote: How do I know the version of a given ticket which needs review? Checkout the branch and run "cat VERSION.txt" -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receivi

Re: [sage-devel] Getting reminders for tickets in needs_work

2016-02-05 Thread Jeroen Demeyer
On 2016-02-05 10:10, Nathann Cohen wrote: I was just wondering if this situation was worth getting some script running (I can give it a try): every week or so it would run, and if a ticket has been in needs_work for more than a month with no comment on it, the script would add a message on the tr

[sage-devel] Getting reminders for tickets in needs_work

2016-02-05 Thread Nathann Cohen
Hello everybody ! Because of another thread here, I noticed this ticket: http://trac.sagemath.org/ticket/16871 It was in `positive_review` 14 months ago, was set back to `needs_work` because of a (minor?) problem in the doc, and apparently forgotten since. I was just wondering if this situa

Re: [sage-devel] Meaning of log2 etc.

2016-02-05 Thread Nathann Cohen
log2 and pi seem to be of the same race: https://groups.google.com/forum/#!topic/sage-devel/Oi3bLbO5eO0 Nathann On 5 February 2016 at 08:04, Jori Mäntysalo wrote: > Can somebody explain what is the meaning of "log2" in the global namespace? > log2? says "- - we need to make sure this at lea

Re: [sage-devel] Re: Relocating sage

2016-02-05 Thread Volker Braun
You need a unique string to search&replace, and after moving from /verylonguniquepath to / you've lost that uniqueness. So to undo you'd have to store the state how it was before patching in some external file. Possible but extra code paths that need to be written and tested... On Friday, Febru

Re: [sage-devel] Re: Relocating sage

2016-02-05 Thread Jeroen Demeyer
On 2016-02-05 09:08, Dima Pasechnik wrote: By the way, I do not see why the present binary patchning procedure cannot get an undo mode. It's not technically impossible, just more work to implement I guess. -- You received this message because you are subscribed to the Google Groups "sage-deve

Re: [sage-devel] Re: Relocating sage

2016-02-05 Thread Dima Pasechnik
By the way, I do not see why the present binary patchning procedure cannot get an undo mode. Then it can be used many times, to move things around. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving

[sage-devel] Meaning of log2 etc.

2016-02-05 Thread Jori Mäntysalo
Can somebody explain what is the meaning of "log2" in the global namespace? log2? says "- - we need to make sure this at least does not leave log2._gobj uninitialized - -". * * * log? says "See log? for more information about its behavior." Duh. log_gamma? has broken docstring formatting. Al