Opened 4 years ago
Closed 4 years ago
#25897 closed defect (fixed)
Incorrect Comparison of embedding index in projective_embedding
Reported by: | raghukul01 | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.4 |
Component: | algebraic geometry | Keywords: | gsoc2018 |
Cc: | bhutz, raghukul01 | Merged in: | |
Authors: | Raghukul Raman | Reviewers: | Ben Hutz |
Report Upstream: | N/A | Work issues: | |
Branch: | 5652a9d (Commits, GitHub, GitLab) | Commit: | 5652a9d33cc9e050ee0273f648a26e0a91ebaa55 |
Dependencies: | Stopgaps: |
Description
Consider this example:
sage: A.<x,y> = AffineSpace(ZZ, 2) sage: A.projective_embedding(4) 1 A = AffineSpace(ZZ, Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2) ----> 2 A.projective_embedding(Integer(3)) /home/raghukul/sage/sage/local/lib/python2.7/site-packages/sage/schemes/affine/affine_space.pyc in projective_embedding(self, i, PP) 724 self.__projective_embedding[i] = phi 725 #make affine patch and projective embedding match --> 726 PP.affine_patch(i,self) 727 return phi 728 /home/raghukul/sage/sage/local/lib/python2.7/site-packages/sage/schemes/projective/projective_space.pyc in affine_patch(self, i, AA) 978 n = self.dimension_relative() 979 if i < 0 or i > n: --> 980 raise ValueError("argument i (= %s) must be between 0 and %s"%(i, n)) 981 try: 982 A = self.__affine_patches[i] ValueError: argument i (= 3) must be between 0 and 2
This however returns a ValueError
, but only when the affine patch is generated for corresponding ProjectiveSpace
. It simply skips the check for index in projective_embedding().
Following line in projective_embedding needs to be corrected:
if n < 0 or n >self.dimension_relative(): raise ValueError("argument i (=%s) must be betwzzeen 0 and %s, inclusive"%(i,n))
Change History (7)
comment:1 Changed 4 years ago by
- Branch set to u/raghukul01/corrected_embedding_25897
comment:2 Changed 4 years ago by
- Commit set to 786531723a5589f32758325e8f15332f6d1969ca
- Status changed from new to needs_review
comment:3 Changed 4 years ago by
- Reviewers set to Ben Hutz
- Status changed from needs_review to needs_work
You should add a doctest item under TESTS for that error message.
comment:4 Changed 4 years ago by
- Commit changed from 786531723a5589f32758325e8f15332f6d1969ca to 5652a9d33cc9e050ee0273f648a26e0a91ebaa55
comment:6 Changed 4 years ago by
- Status changed from needs_review to positive_review
comment:7 Changed 4 years ago by
- Branch changed from u/raghukul01/corrected_embedding_25897 to 5652a9d33cc9e050ee0273f648a26e0a91ebaa55
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
New commits:
25897: Corrected projective_embedding function