Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/sage/graphs/strongly_regular_db.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2492,16 +2492,17 @@ def strongly_regular_from_two_intersection_set(M):
M = [list(p) for p in M]

# For every point in F_q^{k+1} not on the hyperplane of M
for u in [tuple(x) for x in product(K,repeat=k)]:
for x in product(K, repeat=k):
u = tuple(x)
# For every v point of M
for v in M:
# u is adjacent with all vertices on a uv line.
g.add_edges([[u, tuple([u[i] + qq*v[i] for i in range(k)])]
for qq in K if not qq == K.zero()])
g.relabel()
e = QQ((1,k))
e = QQ((1, k))
qq = g.n_vertices()**e
g.name('two-intersection set in PG('+str(k)+','+str(qq)+')')
g.name(f'two-intersection set in PG({k},{qq})')
return g


Expand Down
6 changes: 4 additions & 2 deletions src/sage/modules/fp_graded/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,12 @@ def __classcall__(cls, arg0, generator_degrees=None, relations=(), names=None):

# Use the coefficients given for the relations and make module elements
# from them. Filter out the zero elements, as they are redundant.
rels = [v for v in [generator_module(r) for r in relations] if not v.is_zero()]
rels = [v for r in relations
if not (v := generator_module(r)).is_zero()]

# The free module for the relations of the module.
relations_module = arg0.free_graded_module(tuple([r.degree() for r in rels]))
relations_module = arg0.free_graded_module(tuple([r.degree()
for r in rels]))

# The module we want to model is the cokernel of the following morphism
j = Hom(relations_module, generator_module)(rels)
Expand Down
3 changes: 2 additions & 1 deletion src/sage/plot/animate.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ def _combine_kwds(self, *kwds_tuple):
new_kwds.update(kwds)

for name in ['xmin', 'xmax', 'ymin', 'ymax']:
values = [v for v in [kwds.get(name, None) for kwds in kwds_tuple] if v is not None]
values = [v for kwds in kwds_tuple
if (v := kwds.get(name, None)) is not None]
if values:
new_kwds[name] = getattr(builtins, name[1:])(values)
return new_kwds
Expand Down
3 changes: 2 additions & 1 deletion src/sage/schemes/elliptic_curves/ell_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -2594,7 +2594,8 @@ class of curves. If the j-invariant is not unique in the isogeny
curve_max = 0

r = [0] * len(Es) # adjacency matrix row
for C in [I.codomain() for I in E.isogenies_prime_degree(l)]:
for I in E.isogenies_prime_degree(l):
C = I.codomain()
j = next((k for k, F in enumerate(Es) if C.is_isomorphic(F)),
-1) # index of curve isomorphic to codomain of isogeny
if j >= 0:
Expand Down
4 changes: 2 additions & 2 deletions src/sage/topology/simplicial_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -1763,10 +1763,10 @@ def is_pseudomanifold(self) -> bool:
if d == 0:
return len(self.facets()) == 2
F = self.facets()
X = self.faces()[d-1]
X = self.faces()[d - 1]
# is each (d-1)-simplex is the face of exactly two facets?
for s in X:
if len([a for a in [s.is_face(f) for f in F] if a]) != 2:
if len([1 for f in F if s.is_face(f)]) != 2:
return False
# construct a graph with one vertex for each facet, one edge
# when two facets intersect in a (d-1)-simplex, and see
Expand Down
5 changes: 3 additions & 2 deletions src/sage/topology/simplicial_set_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,10 @@ def simplicial_data_from_kenzo_output(filename) -> dict:
else:
simplex_string = data[start:end].strip()

for s in [_.strip() for _ in simplex_string.split('Simplex : ')]:
for ns in simplex_string.split('Simplex : '):
s = ns.strip()
if s:
name, face_str = (_.strip() for _ in s.split('Faces : '))
name, face_str = (nf.strip() for nf in s.split('Faces : '))
face_str = face_str.strip('()')
face_str = face_str.split('<AbSm ')
faces = []
Expand Down
Loading