Re: [sage-devel] Re: Poll for issue G2 a specific guideline for writing docstrings

2017-05-22 Thread Nicolas M. Thiery
On Fri, May 19, 2017 at 06:23:04AM +, Simon King wrote: > X > > In some context, the technical term ``self`` might be easier to > understand (for someone who knows python...) than natural language, > in other context it may be the other way around > > Maybe +1 as a rule of thumb, but -1 as a

Re: [sage-devel] Re: Poll for issue G1 a specific guideline for writing docstrings

2017-05-22 Thread Nicolas M. Thiery
On Wed, May 17, 2017 at 12:32:47PM -0700, Volker Braun wrote: >I'd try to avoid the entire construct; Its the linguistic equivalent of >if condition: > return True >else: >return False >Just say "Test condition" in the docstring. Yes, I agree!!! If we want to stick

Re: [sage-devel] inplace transpose

2017-05-22 Thread Erik Bray
On Mon, May 22, 2017 at 4:01 PM, Jori Mäntysalo wrote: > On Mon, 22 May 2017, Vincent Delecroix wrote: > >> 1) add an option inplace=True/False. There is at least one such method in >> Sage: the relabel method for graphs. The behavior is as follows: > > > inplace is mentioned at > http://doc.sagem

Re: [sage-devel] inplace transpose

2017-05-22 Thread Jori Mäntysalo
On Mon, 22 May 2017, Vincent Delecroix wrote: 1) add an option inplace=True/False. There is at least one such method in Sage: the relabel method for graphs. The behavior is as follows: inplace is mentioned at http://doc.sagemath.org/html/en/developer/coding_basics.html#miscellanous-minor-thin

Re: [sage-devel] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Kwankyu Lee
On Monday, May 22, 2017 at 2:41:17 PM UTC+2, vdelecroix wrote: > > > Yes! A function in Python always return a unique object. This object > might be a tuple or a list with several components. Ok. Now I understand how you view things. I always thought it is a common idiom in Python that when

Re: [sage-devel] inplace transpose

2017-05-22 Thread Thierry
Hi, On Mon, May 22, 2017 at 02:35:43PM +0200, Vincent Delecroix wrote: > Dear all, > > I would like to have inplace version of transpose for matrices. For the > echelon form we have methods mat.echelonize vs mat.echelon_form. However I > do not see how to deal with transpose in the same way. I se

Re: [sage-devel] inplace transpose

2017-05-22 Thread Vincent Delecroix
On 22/05/2017 14:43, Erik Bray wrote: On Mon, May 22, 2017 at 2:35 PM, Vincent Delecroix <20100.delecr...@gmail.com> wrote: Dear all, I would like to have inplace version of transpose for matrices. For the echelon form we have methods mat.echelonize vs mat.echelon_form. However I do not see h

Re: [sage-devel] inplace transpose

2017-05-22 Thread Erik Bray
On Mon, May 22, 2017 at 2:35 PM, Vincent Delecroix <20100.delecr...@gmail.com> wrote: > Dear all, > > I would like to have inplace version of transpose for matrices. For the > echelon form we have methods mat.echelonize vs mat.echelon_form. However I > do not see how to deal with transpose in the s

Re: [sage-devel] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Vincent Delecroix
On 22/05/2017 14:35, Kwankyu Lee wrote: It seems that some misunderstanding is going on here. If a method returns an integer and a matrix by "Return n, m". I am saying that the output block can be simply OUTPUT: - integer ... - matrix ... instead of OUTPUT: a tuple of ``(n,m)`` where - ``n

[sage-devel] inplace transpose

2017-05-22 Thread Vincent Delecroix
Dear all, I would like to have inplace version of transpose for matrices. For the echelon form we have methods mat.echelonize vs mat.echelon_form. However I do not see how to deal with transpose in the same way. I see three reasonable possibilities 1) add an option inplace=True/False. There

Re: [sage-devel] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Kwankyu Lee
It seems that some misunderstanding is going on here. If a method returns an integer and a matrix by "Return n, m". I am saying that the output block can be simply OUTPUT: - integer ... - matrix ... instead of OUTPUT: a tuple of ``(n,m)`` where - ``n`` is a integer ... - ``m`` is a matrix

[sage-devel] About a mem / cpu -treshold

2017-05-22 Thread Jori Mäntysalo
Let T = Posets.TamariLattice(7). Then for example %timeit T.is_simple() gives 1,41 seconds, whereas %timeit _ = T.lequal_matrix() T.is_simple() says 0,67 seconds. (You must restart the worksheet between tests, because meet- and join-matrices are saved.) Is it OK to add a call to lequal_matr

Re: [sage-devel] Re: Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Sébastien Labbé
On Monday, May 22, 2017 at 10:27:28 AM UTC+2, Jeroen Demeyer wrote: > > > > The only thing I want to see in the OUTPUT > > block is > > the *type* of the objects and how many of them. > > Why that? What's wrong with being verbose in the OUTPUT block? > The OUTPUT block appearing below other,

Re: [sage-devel] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Jori Mäntysalo
On Mon, 22 May 2017, Daniel Krenn wrote: My opinion is that the phrase "a tuple `(a,b,c)` where ..." is just redundant. I think that "a tuple" is important non-redundant information. +1 for "a tuple" in this case (and not skipping this information; it is essential) +1 from me too. Somethin

Re: [sage-devel] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Daniel Krenn
On 2017-05-22 12:08, Jeroen Demeyer wrote: > On 2017-05-22 12:05, Kwankyu Lee wrote: >> My opinion is that the phrase "a tuple `(a,b,c)` where ..." is just >> redundant. > > I think that "a tuple" is important non-redundant information. +1 for "a tuple" in this case (and not skipping this informa

Re: [sage-devel] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Jeroen Demeyer
On 2017-05-22 12:21, Kwankyu Lee wrote: The non-redundant information will be implied by the list of hyphened items, if we stick to the convention. So, in order to understand the docstring, the user needs to read the docstring and the convention on how to read the docstring. Not good! -- You

Re: [sage-devel] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Kwankyu Lee
On Monday, May 22, 2017 at 12:08:35 PM UTC+2, Jeroen Demeyer wrote: > > On 2017-05-22 12:05, Kwankyu Lee wrote: > > My opinion is that the phrase "a tuple `(a,b,c)` where ..." is just > > redundant. > > I think that "a tuple" is important non-redundant information. > The non-redundant inform

Re: [sage-devel] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Jeroen Demeyer
On 2017-05-22 12:05, Kwankyu Lee wrote: My opinion is that the phrase "a tuple `(a,b,c)` where ..." is just redundant. I think that "a tuple" is important non-redundant information. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe

Re: [sage-devel] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Jeroen Demeyer
On 2017-05-22 12:05, Kwankyu Lee wrote: This is ugly. By your previous opinion, wouldn't you prefer this? | OUTPUT:a tuple of ``(a,b,c)``where -``a``is... -``b``is... -``c``is... | I think that the guideline of this thread combined with your one-liner style for OUTPUT allows this. Of cours

Re: [sage-devel] Re: Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Jeroen Demeyer
On 2017-05-22 11:35, Jori Mäntysalo wrote: Why that? What's wrong with being verbose in the OUTPUT block? This is a misquote. I meant to reply to Sébastien Labbé. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group

Re: [sage-devel] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Kwankyu Lee
On Monday, May 22, 2017 at 10:24:32 AM UTC+2, Jeroen Demeyer wrote: > > I very much object to this: > > > If the output consists > > of several items, add each starting with a hyphen. > > If the output consists of several items, the OUTPUT string should > clearly mention that fact (and it sho

Re: [sage-devel] Re: Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Jori Mäntysalo
On Mon, 22 May 2017, Jeroen Demeyer wrote: On 2017-05-19 14:16, Jori Mäntysalo wrote: The only thing I want to see in the OUTPUT block is the *type* of the objects and how many of them. Why that? What's wrong with being verbose in the OUTPUT block? This is a misquote. I support something

Re: [sage-devel] Re: Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Jeroen Demeyer
On 2017-05-19 14:16, Jori Mäntysalo wrote: The only thing I want to see in the OUTPUT block is the *type* of the objects and how many of them. Why that? What's wrong with being verbose in the OUTPUT block? I would like something like INPUT: - ``certificate`` -- boolean; whether to output a c

Re: [sage-devel] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Jeroen Demeyer
I very much object to this: If the output consists of several items, add each starting with a hyphen. If the output consists of several items, the OUTPUT string should clearly mention that fact (and it should mention whether the output is a tuple or list or some other structure with several

[sage-devel] bug in calculus.limit reported in ask.sagemath

2017-05-22 Thread David . Coudert
reported in https://ask.sagemath.org/question/37660/why-is-sage-calling-1-a-variable/ === sage: x = var('x') sage: f = 1/(x-3) sage: limit(f,x=3,dir='below') --- UnboundLocalError Trac