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

Commit

Permalink
Add doctests for #15249, #15248, #10084, #10085, #10086, #13433, #14685.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhansen committed Jan 14, 2014
1 parent bd7527c commit a696708
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/sage/combinat/species/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,55 @@ def __init__(self, R, element_class=None, category=None, names=None):
sage: from sage.combinat.species.series import LazyPowerSeriesRing
sage: L = LazyPowerSeriesRing(QQ)
sage: TestSuite(L).run()
Check that :trac:`15249` is fixed::
sage: L.<x> = LazyPowerSeriesRing(QQ)
sage: (L.zero() + x).coefficients(4)
[0, 1, 0, 0]
sage: (L.zero() - x).coefficients(4)
[0, -1, 0, 0]
Check that :trac:`15248` is fixed::
sage: L.<x> = LazyPowerSeriesRing(QQ)
sage: m = matrix(L, [[x, x], [1, x]])
sage: m.det().coefficients(4)
[0, -1, 1, 0]
sage: L.<x> = LazyPowerSeriesRing(QQ)
sage: m = matrix(L, [[x, x], [1, x]])
sage: m.det().coefficients(4)
[0, -1, 1, 0]
Check that :trac:`10084` is fixed::
sage: one = L(0) + L(1)
sage: one.coefficients(4)
[1, 0, 0, 0]
Check that :trac:`10085` and :trac:`10086` are fixed::
sage: S1.<t> = LazyPowerSeriesRing(ZZ)
sage: S2.<y> = LazyPowerSeriesRing(S1)
sage: y.coefficient(1).coefficient(0)
1
sage: S2(t).coefficient(0)
t
Check that :trac:`13433` is fixed::
sage: L.<x> = LazyPowerSeriesRing(QQ)
sage: x.coefficient(2).parent()
Rational Field
Check that :trac:`14685` is fixed::
sage: R = LazyPowerSeriesRing(QQ)
sage: b = R(iter([0,0,0,1,0]))
sage: coeffs = b.coefficients(10)
sage: b.aorder
3
"""
#Make sure R is a ring with unit element
if not R in Rings():
Expand Down

0 comments on commit a696708

Please sign in to comment.