Skip to content

Commit

Permalink
gh-38641: some fixes for E241
Browse files Browse the repository at this point in the history
    
This is fixing a lot (but not all) E241 warnings about

E241 multiple spaces after ','

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
    
URL: #38641
Reported by: Frédéric Chapoton
Reviewer(s): Frédéric Chapoton, Kwankyu Lee
  • Loading branch information
Release Manager committed Sep 22, 2024
2 parents 29d7056 + dbffb02 commit b43a449
Show file tree
Hide file tree
Showing 39 changed files with 117 additions and 97 deletions.
2 changes: 1 addition & 1 deletion src/sage/categories/bimodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _make_named_class_key(self, name):
sage: Bimodules(Fields(), Rings())._make_named_class_key('element_class')
(Category of fields, Category of rings)
"""
return (self._left_base_ring if isinstance(self._left_base_ring, Category) else self._left_base_ring.category(),
return (self._left_base_ring if isinstance(self._left_base_ring, Category) else self._left_base_ring.category(),
self._right_base_ring if isinstance(self._right_base_ring, Category) else self._right_base_ring.category())

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/coalgebras.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def super_categories(self):
"""
return [Modules(self.base_ring())]

WithBasis = LazyImport('sage.categories.coalgebras_with_basis', 'CoalgebrasWithBasis')
WithBasis = LazyImport('sage.categories.coalgebras_with_basis', 'CoalgebrasWithBasis')
Graded = LazyImport('sage.categories.graded_coalgebras', 'GradedCoalgebras')

class ParentMethods:
Expand Down
3 changes: 2 additions & 1 deletion src/sage/categories/examples/crystals.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def __init__(self):
self.n = 2
self._cartan_type = CartanType(['A', 2])
self.G = DiGraph(5)
self.G.add_edges([ [0,1,1], [1,2,1], [2,3,1], [3,5,1], [0,4,2], [4,5,2] ])
self.G.add_edges([[0, 1, 1], [1, 2, 1], [2, 3, 1],
[3, 5, 1], [0, 4, 2], [4, 5, 2]])
self.module_generators = [self(0)]

def __repr__(self):
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/ncsf_qsym/qsym.py
Original file line number Diff line number Diff line change
Expand Up @@ -2039,7 +2039,7 @@ def on_basis(comp, i):
return P.zero()
else:
return x[i-1]**comp[-1] * on_basis(comp[:-1], i-1) + \
on_basis(comp, i-1)
on_basis(comp, i-1)
return M._apply_module_morphism(self, lambda comp: on_basis(comp,n),
codomain=P)

Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/root_system/cartan_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ def coxeter_matrix(self):
sage: ct.cartan_matrix().coxeter_matrix() == ct.coxeter_matrix()
True
"""
scalarproducts_to_order = {0: 2, 1: 3, 2: 4, 3: 6}
scalarproducts_to_order = {0: 2, 1: 3, 2: 4, 3: 6}
from sage.combinat.root_system.coxeter_matrix import CoxeterMatrix
I = self.index_set()
n = len(I)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/root_system/coxeter_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ def CoxeterGroup(data, implementation='reflection', base_ring=None, index_set=No


from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.root_system.coxeter_group', 'CoxeterGroupAsPermutationGroup', ReflectionGroup)
register_unpickle_override('sage.combinat.root_system.coxeter_group', 'CoxeterGroupAsPermutationGroup', ReflectionGroup)
2 changes: 1 addition & 1 deletion src/sage/combinat/root_system/dynkin_diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ def coxeter_diagram(self):
True
"""
from sage.rings.infinity import infinity
scalarproducts_to_order = {0: 2, 1: 3, 2: 4, 3: 6}
scalarproducts_to_order = {0: 2, 1: 3, 2: 4, 3: 6}
from sage.graphs.graph import Graph
coxeter_diagram = Graph(multiedges=False)
I = self.index_set()
Expand Down
7 changes: 4 additions & 3 deletions src/sage/combinat/root_system/type_A.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,12 @@ def ascii_art(self, label=None, node=None):
label = lambda i: i
if node is None:
node = self._ascii_art_node
ret = "---".join(node(label(i)) for i in range(1,n+1)) + "\n"
ret += "".join("{!s:4}".format(label(i)) for i in range(1,n+1))
ret = "---".join(node(label(i)) for i in range(1, n + 1)) + "\n"
ret += "".join("{!s:4}".format(label(i)) for i in range(1, n + 1))
return ret


# For unpickling backward compatibility (Sage <= 4.1)
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.root_system.type_A', 'ambient_space', AmbientSpace)
register_unpickle_override('sage.combinat.root_system.type_A',
'ambient_space', AmbientSpace)
7 changes: 4 additions & 3 deletions src/sage/combinat/root_system/type_C.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,11 @@ def _default_folded_cartan_type(self):
"""
from sage.combinat.root_system.type_folded import CartanTypeFolded
n = self.n
return CartanTypeFolded(self, ['A', 2*n-1],
[[i, 2*n-i] for i in range(1, n)] + [[n]])
return CartanTypeFolded(self, ['A', 2*n - 1],
[[i, 2*n - i] for i in range(1, n)] + [[n]])


# For unpickling backward compatibility (Sage <= 4.1)
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.root_system.type_C', 'ambient_space', AmbientSpace)
register_unpickle_override('sage.combinat.root_system.type_C',
'ambient_space', AmbientSpace)
10 changes: 4 additions & 6 deletions src/sage/combinat/root_system/type_D.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# https://www.gnu.org/licenses/
# ****************************************************************************
from . import ambient_space
from sage.misc.persist import register_unpickle_override


class AmbientSpace(ambient_space.AmbientSpace):
Expand Down Expand Up @@ -116,9 +117,6 @@ def fundamental_weight(self, i):
return self.sum(self.monomial(j) for j in range(i))


from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.root_system.type_A', 'ambient_space', AmbientSpace)

from sage.misc.cachefunc import cached_method
from .cartan_type import CartanType_standard_finite, CartanType_simply_laced, CartanType_simple

Expand Down Expand Up @@ -349,10 +347,10 @@ def ascii_art(self, label=None, node=None):
ret = (4*(n-3))*" "+"{} {}\n".format(node(label(n)), label(n))
ret += ((4*(n-3))*" " + "|\n")*2
ret += "---".join(node(label(i)) for i in range(1, n)) + "\n"
ret += "".join("{!s:4}".format(label(i)) for i in range(1,n))
ret += "".join("{!s:4}".format(label(i)) for i in range(1, n))
return ret


# For unpickling backward compatibility (Sage <= 4.1)
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.root_system.type_D', 'ambient_space', AmbientSpace)
register_unpickle_override('sage.combinat.root_system.type_D',
'ambient_space', AmbientSpace)
3 changes: 2 additions & 1 deletion src/sage/combinat/root_system/type_E.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,4 +636,5 @@ def ascii_art(self, label=None, node=None):

# For unpickling backward compatibility (Sage <= 4.1)
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.root_system.type_E', 'ambient_space', AmbientSpace)
register_unpickle_override('sage.combinat.root_system.type_E',
'ambient_space', AmbientSpace)
5 changes: 3 additions & 2 deletions src/sage/combinat/root_system/type_F.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def dual(self):
4 3 2 1
F4 relabelled by {1: 4, 2: 3, 3: 2, 4: 1}
"""
return self.relabel({1:4, 2:3, 3:2, 4:1})
return self.relabel({1: 4, 2: 3, 3: 2, 4: 1})

def _default_folded_cartan_type(self):
"""
Expand All @@ -382,4 +382,5 @@ def _default_folded_cartan_type(self):

# For unpickling backward compatibility (Sage <= 4.1)
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.root_system.type_F', 'ambient_space', AmbientSpace)
register_unpickle_override('sage.combinat.root_system.type_F',
'ambient_space', AmbientSpace)
5 changes: 3 additions & 2 deletions src/sage/combinat/root_system/type_G.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def dual(self):
2 1
G2 relabelled by {1: 2, 2: 1}
"""
return self.relabel({1:2, 2:1})
return self.relabel({1: 2, 2: 1})

def _default_folded_cartan_type(self):
"""
Expand All @@ -288,4 +288,5 @@ def _default_folded_cartan_type(self):

# For unpickling backward compatibility (Sage <= 4.1)
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.root_system.type_G', 'ambient_space', AmbientSpace)
register_unpickle_override('sage.combinat.root_system.type_G',
'ambient_space', AmbientSpace)
4 changes: 3 additions & 1 deletion src/sage/combinat/sf/dual.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,4 +988,6 @@ def _repr_(self):

# Backward compatibility for unpickling
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.sf.dual', 'SymmetricFunctionAlgebraElement_dual', SymmetricFunctionAlgebra_dual.Element)
register_unpickle_override('sage.combinat.sf.dual',
'SymmetricFunctionAlgebraElement_dual',
SymmetricFunctionAlgebra_dual.Element)
4 changes: 3 additions & 1 deletion src/sage/combinat/sf/elementary.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,4 +521,6 @@ def f(partition):

# Backward compatibility for unpickling
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.sf.elementary', 'SymmetricFunctionAlgebraElement_elementary', SymmetricFunctionAlgebra_elementary.Element)
register_unpickle_override('sage.combinat.sf.elementary',
'SymmetricFunctionAlgebraElement_elementary',
SymmetricFunctionAlgebra_elementary.Element)
4 changes: 3 additions & 1 deletion src/sage/combinat/sf/homogeneous.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,6 @@ def f(partition):

# Backward compatibility for unpickling
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.sf.homogeneous', 'SymmetricFunctionAlgebraElement_homogeneous', SymmetricFunctionAlgebra_homogeneous.Element)
register_unpickle_override('sage.combinat.sf.homogeneous',
'SymmetricFunctionAlgebraElement_homogeneous',
SymmetricFunctionAlgebra_homogeneous.Element)
4 changes: 2 additions & 2 deletions src/sage/combinat/sf/llt.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,5 +764,5 @@ class Element(LLT_generic.Element):

# Backward compatibility for unpickling
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.sf.llt', 'LLTElement_spin', LLT_spin.Element)
register_unpickle_override('sage.combinat.sf.llt', 'LLTElement_cospin', LLT_cospin.Element)
register_unpickle_override('sage.combinat.sf.llt', 'LLTElement_spin', LLT_spin.Element)
register_unpickle_override('sage.combinat.sf.llt', 'LLTElement_cospin', LLT_cospin.Element)
14 changes: 7 additions & 7 deletions src/sage/combinat/sf/macdonald.py
Original file line number Diff line number Diff line change
Expand Up @@ -1998,16 +1998,16 @@ def qt_kostka(lam, mu):
for p2 in parts:
res = s(H(p2))
for p1 in parts:
_qt_kostka_cache[(p1,p2)] = QQqt(res.coefficient(p1).numerator())
_qt_kostka_cache[(p1, p2)] = QQqt(res.coefficient(p1).numerator())

return _qt_kostka_cache[(lam,mu)]
return _qt_kostka_cache[(lam, mu)]


# Backward compatibility for unpickling
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.sf.macdonald', 'MacdonaldPolynomial_h', MacdonaldPolynomials_h.Element)
register_unpickle_override('sage.combinat.sf.macdonald', 'MacdonaldPolynomial_h', MacdonaldPolynomials_h.Element)
register_unpickle_override('sage.combinat.sf.macdonald', 'MacdonaldPolynomial_ht', MacdonaldPolynomials_ht.Element)
register_unpickle_override('sage.combinat.sf.macdonald', 'MacdonaldPolynomial_j', MacdonaldPolynomials_j.Element)
register_unpickle_override('sage.combinat.sf.macdonald', 'MacdonaldPolynomial_p', MacdonaldPolynomials_p.Element)
register_unpickle_override('sage.combinat.sf.macdonald', 'MacdonaldPolynomial_q', MacdonaldPolynomials_q.Element)
register_unpickle_override('sage.combinat.sf.macdonald', 'MacdonaldPolynomial_s', MacdonaldPolynomials_s.Element)
register_unpickle_override('sage.combinat.sf.macdonald', 'MacdonaldPolynomial_j', MacdonaldPolynomials_j.Element)
register_unpickle_override('sage.combinat.sf.macdonald', 'MacdonaldPolynomial_p', MacdonaldPolynomials_p.Element)
register_unpickle_override('sage.combinat.sf.macdonald', 'MacdonaldPolynomial_q', MacdonaldPolynomials_q.Element)
register_unpickle_override('sage.combinat.sf.macdonald', 'MacdonaldPolynomial_s', MacdonaldPolynomials_s.Element)
2 changes: 1 addition & 1 deletion src/sage/combinat/sf/orthotriang.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,4 +348,4 @@ def _apply_functor(self, R):

# Backward compatibility for unpickling
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.sf.orthotriang', 'SymmetricFunctionAlgebraElement_orthotriang', SymmetricFunctionAlgebra_orthotriang.Element)
register_unpickle_override('sage.combinat.sf.orthotriang', 'SymmetricFunctionAlgebraElement_orthotriang', SymmetricFunctionAlgebra_orthotriang.Element)
8 changes: 5 additions & 3 deletions src/sage/combinat/sf/powersum.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ def scalar(self, x, zee=None):
parent = self.parent()
x = parent(x)
if zee is None:
f = lambda part1, part2: sfa.zee(part1)
f = lambda part1, part2: sfa.zee(part1)
else:
f = lambda part1, part2: zee(part1)
f = lambda part1, part2: zee(part1)
return parent._apply_multi_module_morphism(self, x, f, orthogonal=True)

def _derivative(self, part):
Expand Down Expand Up @@ -933,4 +933,6 @@ def f(partition):

# Backward compatibility for unpickling
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.sf.powersum', 'SymmetricFunctionAlgebraElement_power', SymmetricFunctionAlgebra_power.Element)
register_unpickle_override('sage.combinat.sf.powersum',
'SymmetricFunctionAlgebraElement_power',
SymmetricFunctionAlgebra_power.Element)
4 changes: 3 additions & 1 deletion src/sage/combinat/sf/schur.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,4 +843,6 @@ def f(partition):

# Backward compatibility for unpickling
from sage.misc.persist import register_unpickle_override
register_unpickle_override('sage.combinat.sf.schur', 'SymmetricFunctionAlgebraElement_schur', SymmetricFunctionAlgebra_schur.Element)
register_unpickle_override('sage.combinat.sf.schur',
'SymmetricFunctionAlgebraElement_schur',
SymmetricFunctionAlgebra_schur.Element)
5 changes: 4 additions & 1 deletion src/sage/combinat/species/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ def change_support(perm, support, change_perm=None):
(3,4,5)
"""
if change_perm is None:
change_perm = prod([PermutationGroupElement((i+1,support[i])) for i in range(len(support)) if i+1 != support[i]], PermutationGroupElement([], SymmetricGroup(support)))
change_perm = prod([PermutationGroupElement((i+1, support[i]))
for i in range(len(support))
if i+1 != support[i]],
PermutationGroupElement([], SymmetricGroup(support)))

if isinstance(perm, PermutationGroup_generic):
return PermutationGroup([change_support(g, support, change_perm) for g in perm.gens()])
Expand Down
4 changes: 2 additions & 2 deletions src/sage/functions/spike_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def __call__(self, x):
"""
return self._eval(x)[0]

def plot_fft_abs(self, samples=2**12, xmin=None, xmax=None, **kwds):
def plot_fft_abs(self, samples=2**12, xmin=None, xmax=None, **kwds):
"""
Plot of (absolute values of) Fast Fourier Transform of
the spike function with given number of samples.
Expand All @@ -166,7 +166,7 @@ def plot_fft_abs(self, samples=2**12, xmin=None, xmax=None, **kwds):
k = vector(RDF, [abs(z[i]) for i in range(len(z)//2)])
return k.plot(xmin=0, xmax=1, **kwds)

def plot_fft_arg(self, samples=2**12, xmin=None, xmax=None, **kwds):
def plot_fft_arg(self, samples=2**12, xmin=None, xmax=None, **kwds):
"""
Plot of (absolute values of) Fast Fourier Transform of
the spike function with given number of samples.
Expand Down
6 changes: 3 additions & 3 deletions src/sage/geometry/cone.py
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ def _some_elements_(self):
"""
V = self.ambient_vector_space()
r_iter = iter(self._rays)
p = V(0)
p = V.zero()
yield p
for i in range(5):
try:
Expand All @@ -1995,7 +1995,7 @@ def _some_elements_(self):
return
yield p

def _sort_faces(self, faces):
def _sort_faces(self, faces):
r"""
Return sorted (if necessary) ``faces`` as a tuple.
Expand Down Expand Up @@ -2109,7 +2109,7 @@ def adjacent(self):
if superfaces:
for superface in superfaces:
for facet in facets:
adjacent.update(L.open_interval(facet, superface))
adjacent.update(L.open_interval(facet, superface))
if adjacent:
adjacent.remove(L(self))
return self._sort_faces(adjacent)
Expand Down
4 changes: 2 additions & 2 deletions src/sage/geometry/lattice_polytope.py
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ def _repr_(self):
parts.extend(["face of", str(self.ambient())])
return " ".join(parts)

def _sort_faces(self, faces):
def _sort_faces(self, faces):
r"""
Return sorted (if necessary) ``faces`` as a tuple.
Expand Down Expand Up @@ -1402,7 +1402,7 @@ def adjacent(self):
adjacent = set()
for superface in self.facet_of():
for facet in self.facets():
adjacent.update(L.open_interval(facet, superface))
adjacent.update(L.open_interval(facet, superface))
adjacent.discard(self)
return self._sort_faces(adjacent)

Expand Down
8 changes: 4 additions & 4 deletions src/sage/geometry/polyhedron/backend_polymake.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,11 +717,11 @@ def _test_polymake_pickling(self, tester=None, other=None, **options):
P = self._polymake_polytope
P1 = other._polymake_polytope

tester.assertEqual(P.F_VECTOR, P1.F_VECTOR)
tester.assertEqual(P.VERTICES, P1.VERTICES)
tester.assertEqual(P.F_VECTOR, P1.F_VECTOR)
tester.assertEqual(P.VERTICES, P1.VERTICES)
tester.assertEqual(P.LINEALITY_SPACE, P1.LINEALITY_SPACE)
tester.assertEqual(P.FACETS, P1.FACETS)
tester.assertEqual(P.AFFINE_HULL, P1.AFFINE_HULL)
tester.assertEqual(P.FACETS, P1.FACETS)
tester.assertEqual(P.AFFINE_HULL, P1.AFFINE_HULL)

#########################################################################
class Polyhedron_QQ_polymake(Polyhedron_polymake, Polyhedron_QQ):
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/polyhedron/generating_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def ieqs_repr_lhs(pi):

ieqs, repr_rhss = zip(*[(ieq(a, b), ieq_repr_rhs(a, b))
for a, b in zip(pi[:-1], pi[1:])])
return Polyhedron(ieqs=ieqs), ieqs_repr_lhs(pi) + ''.join(repr_rhss)
return Polyhedron(ieqs=ieqs), ieqs_repr_lhs(pi) + ''.join(repr_rhss)

split = (polyhedron_from_permutation(pi) for pi in Permutations(d))
parts = ZZ(d).factorial()
Expand Down
6 changes: 3 additions & 3 deletions src/sage/graphs/generators/families.py
Original file line number Diff line number Diff line change
Expand Up @@ -4197,9 +4197,9 @@ def MuzychukS6Graph(n, d, Phi='fixed', Sigma='fixed', verbose=False):
from sage.rings.integer_ring import ZZ
from time import time

assert d > 1, 'd must be at least 2'
assert d > 1, 'd must be at least 2'
assert is_even(n * (d-1)), 'n must be even or d must be odd'
assert is_prime_power(n), 'n must be a prime power'
assert is_prime_power(n), 'n must be a prime power'
t = time()

# build L, L_i and the design
Expand Down Expand Up @@ -4741,4 +4741,4 @@ def TruncatedBiwheelGraph(n):
G.add_path(list(range(2*n - 2)))
G.add_edges(edges)

return G
return G
2 changes: 1 addition & 1 deletion src/sage/groups/cubic_braid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ def create_sympl_realization(self, m):

def transvec2mat(v, bas=bas, bform=bform, fact=1):
t = [x + fact*(x * bform * v) * v for x in bas]
return matrix(bform.base_ring(), t)
return matrix(bform.base_ring(), t)

# ------------------------------------------------------------------------------
# setting the centralizing matrix for the case of projective group realization
Expand Down
2 changes: 1 addition & 1 deletion src/sage/homology/homology_vector_space_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def _test_duality(self, **options):
tester = self._tester(**options)
dual = self.dual()
dims = [a[0] for a in self._indices]
for dim in range(max(max(dims), tester._max_runs) + 1):
for dim in range(max(max(dims), tester._max_runs) + 1):
n = len(self.basis(dim))
m = matrix(n, n, [a.eval(b) for a in self.basis(dim) for b in dual.basis(dim)])
tester.assertEqual(m, 1, f"error in dimension {dim}")
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interacts/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ def riemann_sum(
["$i$", "$[x_{i-1},x_i]$", r"$\eta_i$", r"$f(\eta_i)$", "$x_{i}-x_{i-1}$"]
] + [
[i+1,[division[i],division[i+1]],xs[i],ys[i],delka_intervalu[i]] for i in range(n)
], header_row=True))
], header_row=True))

html(r'Riemann sum: $\displaystyle\sum_{i=1}^{%s} f(\eta_i)(x_i-x_{i-1})=%s$ ' %
(latex(n),latex(sum([ys[i]*delka_intervalu[i] for i in range(n)]))))
Expand Down
Loading

0 comments on commit b43a449

Please sign in to comment.