On Fri, May 22, 2009 at 3:38 AM, smichr <smi...@gmail.com> wrote:
>
> Just out of curiosity, is there a reason that one has to use the .args
> option to get the arguments of a sympy-thing rather than just doing a
> direct iteration as in
>
> y=x+S(1)
> for arg in y:
>    print arg
>
> instead of the current method of "for arg in y.args"?
>
> If this is a really obviously involved issue I'm willing to take your
> word for it but just thought I'd ask.

This is how it used to work originally, but when we implemented the
numpy support, the numpy arrays got confused by it, so we implemented
.args. I was playing with Sage pynac and there it seems to work with
the numpy arrays, so maybe the numpy has improved. The way back is
easy, one just implementes Basic.__getitem__ (or what the method is
called, I never remember).

Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to