Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
mantepse committed Jul 31, 2021
1 parent 799e22c commit 97bb021
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/sage/data_structures/coefficient_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,10 @@ def __init__(self, initial_coefficients, is_sparse, constant=None, degree=None,
TESTS::
sage: from sage.data_structures.coefficient_stream import CoefficientStream_exact
sage: CoefficientStream_exact([], False)[0]
0
sage: CoefficientStream_exact([], False)
Traceback (most recent call last):
...
AssertionError: CoefficientStream_exact should only be used for non-zero streams
"""
if constant is None:
Expand Down Expand Up @@ -384,9 +386,9 @@ def __getitem__(self, n):
EXAMPLES::
sage: from sage.data_structures.coefficient_stream import CoefficientStream_exact
sage: s = CoefficientStream_exact([], False)
sage: s = CoefficientStream_exact([1], False)
sage: [s[i] for i in range(-2, 5)]
[0, 0, 0, 0, 0, 0, 0]
[0, 0, 1, 0, 0, 0, 0]
sage: s = CoefficientStream_exact([], False, constant=1)
sage: [s[i] for i in range(-2, 5)]
Expand Down Expand Up @@ -1411,6 +1413,7 @@ def iterate_coefficients(self):
yield self._series[n] * self._scalar
n += 1


class CoefficientStream_neg(CoefficientStream_unary):
"""
Operator for negative of the stream.
Expand Down Expand Up @@ -1642,4 +1645,3 @@ def iterate_coefficients(self):
c = self._ring(self._function(self._series[n]))
yield c
n += 1

0 comments on commit 97bb021

Please sign in to comment.