#18186: Add cardinality() to MatrixSpace
----------------------------------+------------------------
       Reporter:  jmantysalo      |        Owner:
           Type:  defect          |       Status:  new
       Priority:  major           |    Milestone:  sage-6.6
      Component:  linear algebra  |   Resolution:
       Keywords:                  |    Merged in:
        Authors:  vdelecroix      |    Reviewers:
Report Upstream:  N/A             |  Work issues:
         Branch:                  |       Commit:
   Dependencies:                  |     Stopgaps:
----------------------------------+------------------------

Comment (by vdelecroix):

 For the second point I would modify the constructor (i.e. the '__init__'
 method) with just before the call to `Parent.__init__`
 {{{
 if self.__nrows == 0 and self.__ncols == 0:
     is_finite = True
 else:
     is_finite = None
     try:
         is_finite = base_ring.is_finite()
     except (AttributeError,NotImplementedError):
         pass

 if is_finite is True:
     category = category.Finite()
 elif is_finite is False:
     category = category.Infinite()
 }}}
 Vincent

--
Ticket URL: <http://trac.sagemath.org/ticket/18186#comment:2>
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