i tried the first example in the given link and i get the following error:

sage: V0 = span([[1/2,0,0],[3/2,2,1],[0,0,1]],ZZ)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/j_schn14/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/sage/modules/free_module.pyc in span(R,
gens, check, already_echelonized)
    349         [1 0 1]
    350     """
--> 351     if len(gens) == 0:
    352         return FreeModule(R, 0)
    353     else:

/usr/lib/python2.5/site-packages/sage/rings/integer_ring.so in
sage.rings.integer_ring.IntegerRing_class.__len__
(sage/rings/integer_ring.c:3903)()

TypeError: len() of unsized object

is this a bug, or am I doing something wrong?
greatz Mad


Am 19.06.2010 00:32, schrieb William Stein:
> On Fri, Jun 18, 2010 at 3:26 PM, Mad <dajo.m...@web.de> wrote:
>   
>> Hi folkz,
>> i want to create a quotient of two submodules generatet by some
>> vektors and i don't know how to do this.
>>     
> See the examples here:
>
>   http://sagemath.org/doc/reference/sage/modules/fg_pid/fgp_module.html
>
> Already, the first example there is what you're asking about.
>
> William
>
>   
>> i tried this:
>> m = ZZ^2
>> m1 = m.submodul([2,1],[1,2])  #this is ZZ^2 again, but of type
>> 'sage.modules.free_module.FreeModule_submodule_pid'
>> m2 = m.submodul([3,2],[2,1])
>> #i want to do something like:
>> mQuot = m1.quotient(m2)
>>
>> but m1 (or FreeModule_submodule_pid) does not have a member quotient
>> like it has sage.modules.free_module.FreeModule_ambient_pid (of wich
>> typ m is).
>>
>> How do i have to do it?
>>
>> greatz and thnx for your tipps and answers Mad
>>
>> --
>> To post to this group, send email to sage-support@googlegroups.com
>> To unsubscribe from this group, send email to 
>> sage-support+unsubscr...@googlegroups.com
>> For more options, visit this group at 
>> http://groups.google.com/group/sage-support
>> URL: http://www.sagemath.org
>>
>>     
>
>
>   

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to