Boolean Polynomial ring

10 views
Skip to first unread message

sant...@niser.ac.in

unread,
Aug 25, 2017, 4:16:17 PM8/25/17
to sage-support
i am new in sage. and i want to define an array of dimension 79 and every time i want to save a new value in each array shell i.e. for i in range(79) a[i]= any value and also i want define a vector. can you help me out?

David Joyner

unread,
Aug 25, 2017, 4:22:44 PM8/25/17
to SAGE support
I'm not such what your exact question is, but I'll try to answer.

Once you have a list L of numbers, say rationals, you can define a
vector using the
syntax

v = vector(QQ,L)

To define a list, you can use a command like

L = [1/(i^2+1) for in range(79)]

More on Python lists can be found here:
https://docs.python.org/2/tutorial/datastructures.html

Hope this answers your question.


> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support...@googlegroups.com.
> To post to this group, send email to sage-s...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages