Skip to content
Open
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
6 changes: 3 additions & 3 deletions src/sage/schemes/product_projective/morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def __eq__(self, right):
return False
PP = self.parent().codomain()

n = PP.num_components()
n = PP.n_components()
dim = [ P.ngens() for P in PP ]
dim_prefix = [0,dim[0]]

Expand Down Expand Up @@ -332,7 +332,7 @@ def __ne__(self, right):
return True
PP = self.parent().codomain()

n = PP.num_components()
n = PP.n_components()
dim = [ P.ngens() for P in PP ]
dim_prefix = [0,dim[0]]

Expand Down Expand Up @@ -393,7 +393,7 @@ def is_morphism(self):
f = self.change_ring(T.base_ring().fraction_field())
T = T.change_ring(T.base_ring().fraction_field())

for i in range(S.num_components()):
for i in range(S.n_components()):
t = S[i].dimension_relative() + 1
X = T.subscheme(list(f)[m : m + t])
if X.dimension() > -1:
Expand Down
16 changes: 8 additions & 8 deletions src/sage/schemes/product_projective/point.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def __copy__(self):
sage: P == Q
True
"""
P = [copy(self[i]) for i in range(self.codomain().ambient_space().num_components())]
P = [copy(self[i]) for i in range(self.codomain().ambient_space().n_components())]
return (self.codomain().point(P, False))

def __iter__(self):
Expand Down Expand Up @@ -250,7 +250,7 @@ def __len__(self):
4
"""
image = self.codomain().ambient_space()
return image.dimension() + image.num_components()
return image.dimension() + image.n_components()

def __hash__(self):
"""
Expand Down Expand Up @@ -308,7 +308,7 @@ def normalize_coordinates(self):
sage: P
(1 : 2 : 3 , 2 : 1 : 3)
"""
for i in range(self.codomain().ambient_space().num_components()):
for i in range(self.codomain().ambient_space().n_components()):
self[i].normalize_coordinates()

def dehomogenize(self, L):
Expand Down Expand Up @@ -352,7 +352,7 @@ def dehomogenize(self, L):
PP = self.codomain()
A = PP.affine_patch(L)
pt = []
for i in range(PP.ambient_space().num_components()):
for i in range(PP.ambient_space().n_components()):
pt.extend(self[i].dehomogenize(L[i]))
return A(pt)

Expand All @@ -377,9 +377,9 @@ def scale_by(self, t):
"""
if not isinstance(t, (tuple, list)):
raise TypeError("%s must be a list or tuple" % t)
if len(t) != self.codomain().ambient_space().num_components():
if len(t) != self.codomain().ambient_space().n_components():
raise TypeError("%s must have same number of components as %r" % (t, self))
for i in range(self.codomain().ambient_space().num_components()):
for i in range(self.codomain().ambient_space().n_components()):
self[i].scale_by(t[i])

def change_ring(self, R, **kwds):
Expand Down Expand Up @@ -463,7 +463,7 @@ def global_height(self, prec=None):
if K not in NumberFields() and K != ZZ and not isinstance(K, (sage.rings.abc.Order, sage.rings.abc.AlgebraicField)):
raise TypeError("must be over a number field or a number field order or QQbar")

n = self.codomain().ambient_space().num_components()
n = self.codomain().ambient_space().n_components()
return max(self[i].global_height(prec=prec) for i in range(n))

def local_height(self, v, prec=None):
Expand Down Expand Up @@ -501,7 +501,7 @@ def local_height(self, v, prec=None):
if K not in NumberFields():
raise TypeError("must be over a number field or a number field order")

n = self.codomain().ambient_space().num_components()
n = self.codomain().ambient_space().n_components()
return max(self[i].local_height(v, prec=prec) for i in range(n))


Expand Down
4 changes: 2 additions & 2 deletions src/sage/schemes/product_projective/rational_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def enum_product_projective_rational_field(X, B):
raise TypeError("codomain must be product of projective space over the rational field")

R = X.codomain().ambient_space()
m = R.num_components()
m = R.n_components()
iters = [R[i].points_of_bounded_height(bound=B) for i in range(m)]
dim = [R[i].dimension_relative() + 1 for i in range(m)]

Expand Down Expand Up @@ -356,7 +356,7 @@ def sieve(X, bound):
N = P.ngens()
dim_scheme = X.dimension()

num_comp = P.num_components()
num_comp = P.n_components()
comp_dim_relative = [P[i].dimension_relative() + 1 for i in range(num_comp)]

dim_prefix = [0, comp_dim_relative[0]] # prefixes dim list
Expand Down
Loading
Loading