#19044: Span of trivial cones
------------------------+----------------------------
   Reporter:  mjo       |            Owner:
       Type:  defect    |           Status:  new
   Priority:  major     |        Milestone:  sage-6.9
  Component:  geometry  |         Keywords:
  Merged in:            |          Authors:
  Reviewers:            |  Report Upstream:  N/A
Work issues:            |           Branch:
     Commit:            |     Dependencies:
   Stopgaps:            |
------------------------+----------------------------
 The following has been annoying me in my doctests. We can take the span of
 most cones:

 {{{
 sage: K = Cone([(1,)])
 sage: span(K)
 Free module of degree 1 and rank 1 over Integer Ring
 Echelon basis matrix:
 [1]
 sage: span(K, K.lattice().base_ring())
 Sublattice <N(1)>
 }}}

 But `span()` tries to deduce the base ring itself, and that doesn't work
 for the trivial cone:

 {{{
 sage: K = Cone([], ToricLattice(0))
 sage: span(K)
 ...
 AttributeError: 'Objects_with_category' object has no attribute
 'base_ring'
 }}}

 I've worked around it by implementing `span` as a method on
 `IntegralRayCollection`:

 {{{
 def span(self):
     return span(self, self.lattice().base_ring())
 }}}

 Does this approach sound good, or should it be fixed with a special case
 inside `span()`?

--
Ticket URL: <http://trac.sagemath.org/ticket/19044>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to