Skip to content

Commit 731072a

Browse files
committed
remove unnecessary code leftover from merge, and remove unneccesary import detected by pyflakes
1 parent dafdcb4 commit 731072a

File tree

2 files changed

+0
-75
lines changed

2 files changed

+0
-75
lines changed

src/sage/combinat/sf/sfa.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4977,7 +4977,6 @@ def frobenius(self, n):
49774977
# then convert back.
49784978
parent = self.parent()
49794979
m = parent.realization_of().monomial()
4980-
from sage.combinat.partition import Partition
49814980
dct = {lam.stretch(n): coeff for lam, coeff in m(self)}
49824981
result_in_m_basis = m._from_dict(dct)
49834982
return parent(result_in_m_basis)

src/sage/rings/lazy_series.py

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -4428,80 +4428,6 @@ def revert(self):
44284428
plethystic_inverse = revert
44294429
compositional_inverse = revert
44304430

4431-
def _format_series(self, formatter, format_strings=False):
4432-
r"""
4433-
Return nonzero ``self`` formatted by ``formatter``.
4434-
4435-
TESTS::
4436-
4437-
sage: h = SymmetricFunctions(ZZ).h()
4438-
sage: e = SymmetricFunctions(ZZ).e()
4439-
sage: L = LazySymmetricFunctions(tensor([h, e]))
4440-
sage: f = L(lambda n: sum(tensor([h[k], e[n-k]]) for k in range(n+1)))
4441-
sage: f._format_series(repr)
4442-
'(h[]#e[])
4443-
+ (h[]#e[1]+h[1]#e[])
4444-
+ (h[]#e[2]+h[1]#e[1]+h[2]#e[])
4445-
+ (h[]#e[3]+h[1]#e[2]+h[2]#e[1]+h[3]#e[])
4446-
+ (h[]#e[4]+h[1]#e[3]+h[2]#e[2]+h[3]#e[1]+h[4]#e[])
4447-
+ (h[]#e[5]+h[1]#e[4]+h[2]#e[3]+h[3]#e[2]+h[4]#e[1]+h[5]#e[])
4448-
+ (h[]#e[6]+h[1]#e[5]+h[2]#e[4]+h[3]#e[3]+h[4]#e[2]+h[5]#e[1]+h[6]#e[])
4449-
+ O^7'
4450-
"""
4451-
P = self.parent()
4452-
cs = self._coeff_stream
4453-
v = cs._approximate_order
4454-
if isinstance(cs, Stream_exact):
4455-
if not cs._constant:
4456-
m = cs._degree
4457-
else:
4458-
m = cs._degree + P.options.constant_length
4459-
else:
4460-
m = v + P.options.display_length
4461-
4462-
atomic_repr = P._internal_poly_ring.base_ring()._repr_option('element_is_atomic')
4463-
mons = [P._monomial(self[i], i) for i in range(v, m) if self[i]]
4464-
if not isinstance(cs, Stream_exact) or cs._constant:
4465-
if P._internal_poly_ring.base_ring() is P.base_ring():
4466-
bigO = ["O(%s)" % P._monomial(1, m)]
4467-
else:
4468-
bigO = ["O^%s" % m]
4469-
else:
4470-
bigO = []
4471-
4472-
from sage.misc.latex import latex
4473-
from sage.typeset.unicode_art import unicode_art
4474-
from sage.typeset.ascii_art import ascii_art
4475-
from sage.misc.repr import repr_lincomb
4476-
from sage.typeset.symbols import ascii_left_parenthesis, ascii_right_parenthesis
4477-
from sage.typeset.symbols import unicode_left_parenthesis, unicode_right_parenthesis
4478-
if formatter == repr:
4479-
poly = repr_lincomb([(1, m) for m in mons + bigO], strip_one=True)
4480-
elif formatter == latex:
4481-
poly = repr_lincomb([(1, m) for m in mons + bigO], is_latex=True, strip_one=True)
4482-
elif formatter == ascii_art:
4483-
if atomic_repr:
4484-
poly = ascii_art(*(mons + bigO), sep = " + ")
4485-
else:
4486-
def parenthesize(m):
4487-
a = ascii_art(m)
4488-
h = a.height()
4489-
return ascii_art(ascii_left_parenthesis.character_art(h),
4490-
a, ascii_right_parenthesis.character_art(h))
4491-
poly = ascii_art(*([parenthesize(m) for m in mons] + bigO), sep = " + ")
4492-
elif formatter == unicode_art:
4493-
if atomic_repr:
4494-
poly = unicode_art(*(mons + bigO), sep = " + ")
4495-
else:
4496-
def parenthesize(m):
4497-
a = unicode_art(m)
4498-
h = a.height()
4499-
return unicode_art(unicode_left_parenthesis.character_art(h),
4500-
a, unicode_right_parenthesis.character_art(h))
4501-
poly = unicode_art(*([parenthesize(m) for m in mons] + bigO), sep = " + ")
4502-
4503-
return poly
4504-
45054431
def symmetric_function(self, degree=None):
45064432
r"""
45074433
Return ``self`` as a symmetric function if ``self`` is actually so.

0 commit comments

Comments
 (0)