Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:sagemath/sage into trac_role_to_…
Browse files Browse the repository at this point in the history
…github
  • Loading branch information
roed314 committed Feb 9, 2023
2 parents 6fb1f32 + 104dde9 commit 89eed0b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 7 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1"
-->
### 📚 Description

<!-- Describe your changes in detail -->
<!-- Describe your changes here in detail -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If it resolves an open issue, please link to the issue here. For example "Closes #1337" -->

Expand All @@ -10,6 +15,7 @@
<!-- If your change requires a documentation PR, please link it appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] I have made sure that the title is self-explanatory and the description concisely explains the PR.
- [ ] I have linked an issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.
Expand Down
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 89eed0b

Please sign in to comment.