Hi Nova Since `a` is a python tuple, you can not access its elements by passing a symbol as index.
`summation` can be used like this: >>> summation(2*i - 1, (i, 1, n)) Hope this helps. Regards Sudhanshu Mishra www.sudhanshumishra.in On Mon, Aug 4, 2014 at 11:00 AM, Nova Munch <[email protected]> wrote: > hello. > > i have a tuple of symbols, a where a is (a_0, a_1, a_2, a_3, a_4) > > i want to call: > >> summation(a[i], (i, 0, 4)) > > but python returns a TypeError that the indices must be integers, not > Symbol. > > this is more of a python constraint instead of Sympy. but is there some > workaround to it? > > thanks folks! > > -- > You received this message because you are subscribed to the Google Groups > "sympy" 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/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/70299343-3cca-4274-80c7-24505ce47816%40googlegroups.com > <https://groups.google.com/d/msgid/sympy/70299343-3cca-4274-80c7-24505ce47816%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sympy" 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/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAFW_KCRXSTcuoPoKZS9Te0JzzPAbMAub05wW3jLw5Hy%3DYq%3Df4Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
