Skip to content

Commit

Permalink
undo ancient hack to resolve sagemath#35017
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyx4 committed Feb 8, 2023
1 parent 6a4667b commit 64cfac5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/sage/schemes/elliptic_curves/ell_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,22 +254,19 @@ def __init__(self, curve, v, check=True):
(1 : -2 : 1)
"""
point_homset = curve.point_homset()
R = point_homset.value_ring()
if is_SchemeMorphism(v) or isinstance(v, EllipticCurvePoint_field):
v = list(v)
elif v == 0:
# some of the code assumes that E(0) has integral entries
# regardless of the base ring...
# R = self.base_ring()
# v = (R.zero(),R.one(),R.zero())
v = (0, 1, 0)
v = (R.zero(), R.one(), R.zero())
if check:
# mostly from SchemeMorphism_point_projective_field
d = point_homset.codomain().ambient_space().ngens()
if not isinstance(v, (list, tuple)):
raise TypeError("Argument v (= %s) must be a scheme point, list, or tuple." % str(v))
if len(v) != d and len(v) != d-1:
raise TypeError("v (=%s) must have %s components" % (v, d))
v = Sequence(v, point_homset.value_ring())
v = Sequence(v, R)
if len(v) == d-1: # very common special case
v.append(v.universe()(1))

Expand Down

0 comments on commit 64cfac5

Please sign in to comment.