Issue 3102 in sympy: Piecewise subs of function fails

Showing 1-5 of 5 messages
Issue 3102 in sympy: Piecewise subs of function fails sy...@googlecode.com 2/24/12 9:04 PM
Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium NeedsReview smichr

New issue 3102 by smi...@gmail.com: Piecewise subs of function fails
http://code.google.com/p/sympy/issues/detail?id=3102

g = Function('g')
h = Function('h')
p = Piecewise((g, x < -1), (g(x), x <= 1))

This fails with a TypeError.

This is corrected in https://github.com/sympy/sympy/pull/690

Re: Issue 3102 in sympy: Piecewise subs of function fails sy...@googlecode.com 2/25/12 12:45 AM

Comment #1 on issue 3102 by asme...@gmail.com: Piecewise subs of function  
fails
http://code.google.com/p/sympy/issues/detail?id=3102

I take it you wanted to do something else too.  That alone doesn't fail,  
and you're not using the h you defined.

Anyway, if something with a bare Function fails, it's not surprising, as  
this does not really make sense.

Re: Issue 3102 in sympy: Piecewise subs of function fails sy...@googlecode.com 2/25/12 3:52 AM

Comment #2 on issue 3102 by smi...@gmail.com: Piecewise subs of function  
fails
http://code.google.com/p/sympy/issues/detail?id=3102

sorry, p.subs(g, h). I thought it didn't make sense, either, but such a  
piecewise could be used to select the function that you want to apply, I  
think. Imagine that the g(x) were replaced with f (another  
UndefinedFunction).

Re: Issue 3102 in sympy: Piecewise subs of function fails sy...@googlecode.com 2/25/12 2:37 PM

Comment #3 on issue 3102 by asme...@gmail.com: Piecewise subs of function  
fails
http://code.google.com/p/sympy/issues/detail?id=3102

I disagree.  Unless we can get this kind of thing to work generically  
(issue 2006), we shouldn't pretend that it works at all.

Re: Issue 3102 in sympy: Piecewise subs of function fails sy...@googlecode.com 3/16/12 10:14 PM
Updates:
        Status: Fixed

Comment #4 on issue 3102 by smi...@gmail.com: Piecewise subs of function  
fails
http://code.google.com/p/sympy/issues/detail?id=3102

replacement of functions doesn't fail now.