Skip to content

Commit 31e6f04

Browse files
committed
a bit more in plot and modules
1 parent 03e3e8a commit 31e6f04

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/sage/modules/fg_pid/fgp_element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# This adds extra maybe-not-necessary checks in the code, but could
2222
# slow things down. It can impact what happens in more than just this
2323
# file.
24-
DEBUG=True
24+
DEBUG = True
2525

2626

2727
class FGP_Element(ModuleElement):

src/sage/modules/fg_pid/fgp_morphism.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def _repr_(self):
127127
sage: phi._repr_()
128128
'Morphism from module over Integer Ring with invariants (4, 12) to module with invariants (4, 12) that sends the generators to [(1, 3), (0, 11)]'
129129
"""
130-
return "Morphism from module over %s with invariants %s to module with invariants %s that sends the generators to %s"%(
130+
return "Morphism from module over %s with invariants %s to module with invariants %s that sends the generators to %s" % (
131131
self.domain().base_ring(), self.domain().invariants(), self.codomain().invariants(),
132132
list(self.im_gens()))
133133

src/sage/modules/with_basis/morphism.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -691,9 +691,9 @@ def __init__(self, triangular="upper", unitriangular=False,
691691
self._inverse_on_support = inverse_on_support
692692

693693
if invertible is None and (domain.basis().keys() == codomain.basis().keys()) and \
694-
(self._inverse_on_support==identity or domain in Modules.FiniteDimensional):
694+
(self._inverse_on_support == identity or domain in Modules.FiniteDimensional):
695695
invertible = True
696-
self._invertible=invertible
696+
self._invertible = invertible
697697

698698
def _richcmp_(self, other, op):
699699
r"""
@@ -772,10 +772,10 @@ def _test_triangular(self, **options):
772772
bs, co = self._dominant_item(on_basis(x))
773773
if self._unitriangular:
774774
tester.assertEqual(co, self.domain().base_ring().one(),
775-
LazyFormat("morphism is not unitriangular on %s")%(x))
775+
LazyFormat("morphism is not unitriangular on %s") % (x))
776776
xback = self._inverse_on_support(bs)
777777
tester.assertEqual(x, xback,
778-
LazyFormat("morphism is not triangular on %s")%(x))
778+
LazyFormat("morphism is not triangular on %s") % (x))
779779

780780
def __invert__(self):
781781
"""
@@ -1452,12 +1452,12 @@ def __init__(self, domain, diagonal, codomain=None, category=None):
14521452
"and the same basis indexing")
14531453
from collections.abc import Callable
14541454
if not isinstance(diagonal, Callable):
1455-
raise ValueError("diagonal (=%s) should be a function"%diagonal)
1455+
raise ValueError("diagonal (=%s) should be a function" % diagonal)
14561456
if category is None:
14571457
category = ModulesWithBasis(domain.base_ring())
14581458
ModuleMorphismByLinearity.__init__(
14591459
self, domain=domain, codomain=codomain, category=category)
1460-
self._diagonal=diagonal
1460+
self._diagonal = diagonal
14611461

14621462
def _richcmp_(self, other, op):
14631463
r"""

src/sage/plot/plot3d/plot3d.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def __init__(self, dep_var, indep_vars):
263263
"""
264264
all_vars = sage_getargspec(self.transform).args[1:]
265265
if set(all_vars) != set(indep_vars + [dep_var]):
266-
raise ValueError('variables were specified incorrectly for this coordinate system; incorrect variables were %s'%list(set(all_vars).symmetric_difference(set(indep_vars+[dep_var]))))
266+
raise ValueError('variables were specified incorrectly for this coordinate system; incorrect variables were %s' % list(set(all_vars).symmetric_difference(set(indep_vars+[dep_var]))))
267267
self.dep_var = dep_var
268268
self.indep_vars = indep_vars
269269

@@ -1372,20 +1372,20 @@ def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds):
13721372

13731373
from sage.modules.vector_callable_symbolic_dense import Vector_callable_symbolic_dense
13741374
if isinstance(transformation, (tuple, list,Vector_callable_symbolic_dense)):
1375-
if len(transformation)==3:
1375+
if len(transformation) == 3:
13761376
if params is None:
13771377
raise ValueError("must specify independent variable names in the ranges when using generic transformation")
13781378
indep_vars = params
1379-
elif len(transformation)==4:
1379+
elif len(transformation) == 4:
13801380
indep_vars = transformation[3]
13811381
transformation = transformation[0:3]
13821382
else:
13831383
raise ValueError("unknown transformation type")
13841384
# find out which variable is the function variable by
13851385
# eliminating the parameter variables.
13861386
all_vars = set(sum([list(s.variables()) for s in transformation],[]))
1387-
dep_var=all_vars - set(indep_vars)
1388-
if len(dep_var)==1:
1387+
dep_var = all_vars - set(indep_vars)
1388+
if len(dep_var) == 1:
13891389
dep_var = dep_var.pop()
13901390
transformation = _ArbitraryCoordinates(transformation, dep_var, indep_vars)
13911391
else:

src/sage/plot/plot3d/tri_plot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class of the form
6464
sage: print(tri.str())
6565
[0, 0, 0] [-1, 2, 3] [0, 2, 0] 0
6666
"""
67-
return "%s %s %s %s"%(self._a, self._b, self._c, self._color)
67+
return "%s %s %s %s" % (self._a, self._b, self._c, self._color)
6868

6969
def set_color(self, color):
7070
"""
@@ -135,7 +135,7 @@ def str(self):
135135
sage: print(t.str())
136136
[1, 2, 3] [2, 3, 4] [0, 0, 0] 0 [0, 0, 1] [0, 1, 0] [1, 0, 0]
137137
"""
138-
return "%s %s %s %s %s %s %s"%(self._a, self._b, self._c, self._color, self._da, self._db, self._dc)
138+
return "%s %s %s %s %s %s %s" % (self._a, self._b, self._c, self._color, self._da, self._db, self._dc)
139139

140140
def get_normals(self):
141141
"""

0 commit comments

Comments
 (0)