That's great, thanks a lot!

Stan

Martin Albrecht wrote:
>> Could you give an example of how to convert a list (e.g. [1,2,3,4]) to a
>> vector (e.g. (1,2,3,4) and back again? That would help me a lot.
>>     
>
> sage: l = [1,2,3,4]
> sage: v = vector(ZZ,l); v
> (1, 2, 3, 4)
> sage: list(v) # list of ZZs
> [1, 2, 3, 4]
> sage: map(int, list(v)) # list of ints
> [1, 2, 3, 4]
>
> Cheers,
> Martin
>
>   

-- 
________________________________________

Stan Schymanski
Research Scientist
Max Planck Institute for Biogechemistry
Postfach 10 01 64
D-07701 Jena

Phone: +49.3641.576264
Fax: +49.3641.577274
Email: [EMAIL PROTECTED]
WWW: http://www.bgc-jena.mpg.de/~sschym

Biospheric Theory and Modelling Group
http://www.bgc-jena.mpg.de/bgc-theory/
_________________________________________


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to