sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.4k stars 473 forks source link

doc tweaks in OEIS #30909

Closed fchapoton closed 3 years ago

fchapoton commented 3 years ago

and full flake8 for this file

CC: @sagetrac-tmonteil @slel @seblabbe

Component: combinatorics

Author: Frédéric Chapoton

Branch/Commit: c0c13c9

Reviewer: Thierry Monteil

Issue created by migration from https://trac.sagemath.org/ticket/30909

fchapoton commented 3 years ago

New commits:

0eb1d10enhance search in oeis (works for tuples)
fchapoton commented 3 years ago

Commit: 0eb1d10

fchapoton commented 3 years ago

Branch: u/chapoton/30909

edd8e884-f507-429a-b577-5d554626c0fe commented 3 years ago
comment:2

I do not see the point of the commit, in particular the code query = list(query), the current code works correctly with tuples already:

sage: oeis((1,2,5,16,61))                                                                                                                                                                                    
0: A000111: Euler or up/down numbers: e.g.f. sec(x) + tan(x). Also for n >= 2, half the number of alternating permutations on n letters (A001250).
1: A138265: Number of upper triangular zero-one matrices with n ones and no zero rows or columns.
2: A303058: G.f. A(x) satisfies: A(x) = Sum_{n>=0} (1+x)^(n^2) * x^n / A(x)^n.

Perhaps could we improve the doc of find_by_subsequence, in the INPUT section to explicitely state:

- ``subsequence`` -- a list or tuple of integers.
edd8e884-f507-429a-b577-5d554626c0fe commented 3 years ago
comment:3

Also, if some handling of the data should be done (this is not the case), it seems better to do it in the find_by_subsequence method, since the __call__ method is a just dispatcher.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

c0c13c9better doc for OEIS searching
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from 0eb1d10 to c0c13c9

fchapoton commented 3 years ago
comment:5

ok, en effet. J'ai du essayer sur une suite inconnue de l'OEIS

voila donc une branche qui se contente d'ajouter un doctest et de modifier la doc

fchapoton commented 3 years ago

Description changed:

--- 
+++ 
@@ -1 +1 @@
-and not only lists
+and full flake8 for this file
edd8e884-f507-429a-b577-5d554626c0fe commented 3 years ago

Reviewer: Thierry Monteil

edd8e884-f507-429a-b577-5d554626c0fe commented 3 years ago
comment:7

OK.

vbraun commented 3 years ago

Changed branch from u/chapoton/30909 to c0c13c9