Hmm.  I have no idea of what you want, but...

In [32]: A = IndexedBase('A')

In [33]: n=Symbol('n', integer=True)

In [34]: Sum(A[n],(n,0,2))
Out[34]: 
  2       
 ___      
 ╲        
  ╲   A[n]
  ╱       
 ╱        
 ‾‾‾      
n = 0     

In [35]: _.doit()
Out[35]: A[0] + A[1] + A[2]

On Monday, August 4, 2014 9:30:38 AM UTC+4, Nova Munch 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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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/46c8adbf-4070-44ac-b0c8-720612b48a4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to