Skip to content

Commit 64cfac5

Browse files
committed
undo ancient hack to resolve #35017
1 parent 6a4667b commit 64cfac5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/sage/schemes/elliptic_curves/ell_point.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,22 +254,19 @@ def __init__(self, curve, v, check=True):
254254
(1 : -2 : 1)
255255
"""
256256
point_homset = curve.point_homset()
257+
R = point_homset.value_ring()
257258
if is_SchemeMorphism(v) or isinstance(v, EllipticCurvePoint_field):
258259
v = list(v)
259260
elif v == 0:
260-
# some of the code assumes that E(0) has integral entries
261-
# regardless of the base ring...
262-
# R = self.base_ring()
263-
# v = (R.zero(),R.one(),R.zero())
264-
v = (0, 1, 0)
261+
v = (R.zero(), R.one(), R.zero())
265262
if check:
266263
# mostly from SchemeMorphism_point_projective_field
267264
d = point_homset.codomain().ambient_space().ngens()
268265
if not isinstance(v, (list, tuple)):
269266
raise TypeError("Argument v (= %s) must be a scheme point, list, or tuple." % str(v))
270267
if len(v) != d and len(v) != d-1:
271268
raise TypeError("v (=%s) must have %s components" % (v, d))
272-
v = Sequence(v, point_homset.value_ring())
269+
v = Sequence(v, R)
273270
if len(v) == d-1: # very common special case
274271
v.append(v.universe()(1))
275272

0 commit comments

Comments
 (0)