#15369: IntegerVectors/FreeModules/AdditiveAbelianGroup of dimension 1 do not
accept 5 as input and expect [5]
-----------------------------+---------------------------------
   Reporter:  ncohen         |            Owner:
       Type:  defect         |           Status:  new
   Priority:  major          |        Milestone:  sage-5.13
  Component:  combinatorics  |         Keywords:
  Merged in:                 |          Authors:  Nathann Cohen
  Reviewers:                 |  Report Upstream:  N/A
Work issues:                 |           Branch:
     Commit:                 |     Dependencies:
   Stopgaps:                 |
-----------------------------+---------------------------------
 Following the discussion at https://groups.google.com/d/msg/sage-
 devel/tyAxhqxk3ZI/SuBg2Ukwwj4J

 When one creates the additive group `Z/nZ`, it would be nice to be able to
 use integers and cast them as members of this group. However :

 {{{
 sage: G=AdditiveAbelianGroup([5]); G(1)
 TypeError: can't initialize vector from nonzero non-list
 }}}

 The same way with free modules :

 {{{
 sage: G=FreeModule(ZZ,1); G(1)
 TypeError: can't initialize vector from nonzero non-list
 }}}

 This patch makes it possible :

 {{{
 sage: G=AdditiveAbelianGroup([5]); G(1)
 (1)
 sage: G=FreeModule(ZZ,1); G(1)
 (1)
 }}}

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/15369>
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/groups/opt_out.

Reply via email to