#13433: Lazy power series: fix bad handling of base ring and categorification
-----------------------------------------------+----------------------------
Reporter: hivert | Owner: hivert
Type: defect | Status: new
Priority: major | Milestone: sage-5.10
Component: combinatorics | Resolution:
Keywords: LazyPowerSeries, categories | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Florent Hivert | Merged in:
Dependencies: | Stopgaps:
-----------------------------------------------+----------------------------
Description changed by hivert:
Old description:
> Currently
> {{{
> sage: R = LazyPowerSeriesRing(QQ)
> sage: type(R.gen().coefficient(0))
> <type 'sage.rings.rational.Rational'>
> sage: type(R.gen().coefficient(1))
> <type 'int'>
> sage: type(R.gen().coefficient(2))
> <type 'int'>
> }}}
> it should be always {{{Rational}}}
New description:
Currently
{{{
sage: R = LazyPowerSeriesRing(QQ)
sage: type(R.gen().coefficient(0))
<type 'sage.rings.rational.Rational'>
sage: type(R.gen().coefficient(1))
<type 'int'>
sage: type(R.gen().coefficient(2))
<type 'int'>
}}}
it should be always {{{Rational}}}
I also fixed the following bug:
{{{
sage: from sage.combinat.species.series import LazyPowerSeriesRing
sage: L = LazyPowerSeriesRing(QQ)
sage: g = L.gen(); z = L.zero()
sage: s = z+g; s
Uninitialized lazy power series
sage: s.coefficients(10)
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
sage: s
Uninitialized lazy power series
}}}
It should be:
{{{
sage: s.coefficients(10)
[0, 1, 0, 0, 0, 0, 0, 0, 0, 0]
sage: s
x + O(x^10)
}}}
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13433#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.