Opened 10 years ago
Closed 9 years ago
#11902 closed defect (fixed)
Fan subdivision should check rays
Reported by: | vbraun | Owned by: | AlexGhitza |
---|---|---|---|
Priority: | major | Milestone: | sage-4.8 |
Component: | algebraic geometry | Keywords: | toric |
Cc: | Merged in: | sage-4.8.alpha6 | |
Authors: | Andrey Novoseltsev | Reviewers: | Volker Braun |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
The following should raise an error:
sage: fan = toric_varieties.P2().fan() sage: fan.subdivide(new_rays=[(0,0)]) Rational polyhedral fan in 2-d lattice N
Right now, you only fall on your face once you try to do something with this "subdivided" fan:
sage: _.cones() --------------------------------------------------------------------------- KeyError Traceback (most recent call last) /home/vbraun/Sage/EllipticFibration/<ipython console> in <module>() /home/vbraun/Sage/sage/local/lib/python2.6/site-packages/sage/geometry/fan.pyc in cones(self, dim, codim) 1744 if "_cones" not in self.__dict__: 1745 levels = [(e.element for e in level) # Generators -> 1746 for level in self.cone_lattice().level_sets()] 1747 levels.pop() # The very last level is this FAN, not cone. 1748 # It seems that there is no reason to believe that the order of /home/vbraun/Sage/sage/local/lib/python2.6/site-packages/sage/geometry/fan.pyc in cone_lattice(self) 1682 """ 1683 if "_cone_lattice" not in self.__dict__: -> 1684 self._compute_cone_lattice() 1685 return self._cone_lattice 1686 /home/vbraun/Sage/sage/local/lib/python2.6/site-packages/sage/geometry/fan.pyc in _compute_cone_lattice(self) 1099 # Make sure that rays are in the beginning in proper order 1100 head = [rays_to_index[()]] # Empty face -> 1101 head.extend(rays_to_index[(n,)] for n in range(self.nrays())) 1102 new_order = head + [n for n in new_order if n not in head] 1103 # "Invert" this list to a dictionary /home/vbraun/Sage/sage/local/lib/python2.6/site-packages/sage/geometry/fan.pyc in <genexpr>((n,)) 1099 # Make sure that rays are in the beginning in proper order 1100 head = [rays_to_index[()]] # Empty face -> 1101 head.extend(rays_to_index[(n,)] for n in range(self.nrays())) 1102 new_order = head + [n for n in new_order if n not in head] 1103 # "Invert" this list to a dictionary KeyError: (3,)
Attachments (1)
Change History (8)
comment:1 Changed 10 years ago by
Changed 10 years ago by
comment:2 Changed 10 years ago by
- Keywords toric added
- Reviewers set to Volker Braun
comment:3 Changed 10 years ago by
- Status changed from new to needs_review
comment:5 Changed 9 years ago by
- Milestone set to sage-4.8
Happy holidays, Volker! Could you please check this one-liner?-)
comment:6 Changed 9 years ago by
- Status changed from needs_review to positive_review
Sorry, forgot! Positive review!
comment:7 Changed 9 years ago by
- Merged in set to sage-4.8.alpha6
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Horrible! Will fix shortly.