This looks like a bug in SymPy. Can you paste the full traceback?

Aaron Meurer

On Sat, Jul 11, 2015 at 11:05 AM, 万博 <[email protected]> wrote:

> Greetings, everyone.
>      I am trying to use sympy calculate a perturbation problem, which
> looks like:
>
> <https://lh3.googleusercontent.com/-85X7sj42udw/VaE8SsgPpTI/AAAAAAAAAFs/4aHMDhFRZOY/s1600/per.png>
>      In sympy, I think it's safe to use code like:(all elements are
> Matrices.)
>
>      i=Symbol("i",integer=True)
>      summation( (u.H*Hamil*p.col(i))*(p.col(i).H*Hamil*u) , (i,0,5))
>
>      However, it gives the error:
>      IndexError: Invalid index a[i]
>
>      I have calculated manually the sum, which gives the right result. SO,
> I guess there is some misunderstanding about summation().
>      Any advises about solving this would be appreciated.
>      Thanks.
>
> --
> 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/6dee658f-88ac-4ed9-9061-ab7859cf9f9e%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/6dee658f-88ac-4ed9-9061-ab7859cf9f9e%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/CAKgW%3D6K720KV-ek4pyxmZtw1HkuRjqvFwR1HThVRUWWn1h8AGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to