Closed PeterLuschny closed 8 years ago
Branch: u/moritz/ticket/17330
Here is how this could be fixed (see git branch).
When doctesting this, I noticed the another bug:
**********************************************************************
File "src/sage/databases/oeis.py", line 845, in sage.databases.oeis.OEISSequence.keywords
Failed example:
f.keywords() # optional -- internet
Expected:
('core', 'nonn', 'nice', 'easy', 'hear')
Got:
('core', 'nonn', 'nice', 'easy', 'hear', 'changed')
**********************************************************************
This is due to the fact that the keyword 'changed' is temporarily added, so this would go away after a while. I propose to change that example to a sequence that is not altered as often as the Fibonacci numbers (see commit)
New commits:
8ea4b1a | first try to fix 17330 |
Branch pushed to git repo; I updated commit sha1. New commits:
10c15fc | second try to fix 17330 |
You should put your full name in the "Authors" field.
Author: Moritz Firsching
done
The patch provided does not do what is in the description. Namely the dead sequences are not ignored!
I would add an explicit error message like
sage: oeis(17)
Traceback (most recent call last):
...
ValueError: this sequence is dead "A000017: Erroneous version of A032522."
Possibly, you could add an option to get it even if it is dead
sage: oeis(17, force=True)
A000017: Erroneous version of A032522.
Branch pushed to git repo; I updated commit sha1. New commits:
d416ecc | adding a warning |
Better!
Reviewer: Vincent Delecroix
Changed reviewer from Vincent Delecroix to none
Perhaps throwing an error is too much? I just pushed a version where you have a warning..
Reviewer: Vincent Delecroix
yeap. this is fine. (I rewrote my name as a reviewer)
Changed branch from u/moritz/ticket/17330 to d416ecc
OEIS functions should simply ignore sequences with the keyword 'dead'. At least they should not attempt to return terms of these sequences.
For example the sequence A000017 https://oeis.org/A000017 is 'dead', what means it has errors in the data and was replaced by another version. It is policy of the OEIS to keep such sequences so they can be found in the case they are referenced in the literature.
As it is now oeis(17).first_terms(12) throws the TypeError: You found a sign inconsistency, please contact OEIS
CC: @mo271
Component: misc
Keywords: OEIS
Author: Moritz Firsching
Branch/Commit:
d416ecc
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/17330