On Tue, Jul 26, 2011 at 5:25 PM, Matthew Brett <[email protected]> wrote:
> Hi,
>
> On Mon, Jul 25, 2011 at 8:49 PM, Aaron Meurer <[email protected]> wrote:
>> I think the proper fix is to either make DeferredVector an Expr object
>> or give it a _sympy_ method so that sympify() knows how to convert it
>> without resorting to trying to iterate over it.
>>
>> Actually, I see now that DeferredVector is a generator of Symbol
>> objects.  So expr.subs(x, newt) makes about as much sense as
>> expr.subs(x, cos) (that's not a typo).
>
> Yes, you're right, the DeferredVector doesn't make sense there.
> Luckily, in our production code, we'd removed it some time ago, so the
> behavior of 0.7.1 won't be a significant direct problem for us
> (nipy.org).
>
> Do you think it is worth trying to make the subs give a more specific
> error though?
>
> Best,
>
> Matthew
>

Well, what needs to be fixed is sympify(DeferredVector('t')).  What do
you think this should return?  To me, DeferredVector should already be
a SymPy object, in which case it would return itself.

If that is fixed, then either it will automatically have a better
error or it will just work, depending on what you make sympify return.
 Because, right now, the problem is in sympify(), not subs().

Aaron Meurer

P.S., why do you have your docs on sourceforge and your code on
GitHub?  Have you heard of gh-pages?

P.S.S., feel free to send in a patch fixing the above.

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

Reply via email to