hello!
yes. i think thats very close to what i am looking for.
thank you!
On Monday, August 4, 2014 10:23:09 PM UTC+8, Sergey Kirpichev wrote:
>
> 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 [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/e88b3dd4-49b2-4420-995d-246229f30e1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.