New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
piecewise_fold does not handle bound variables #12631
Comments
Maybe I'm missing something but I don't see any error here. Why [5] and [6] should be identical? picewise_fold() takes an expression containing a piecewise function and returns the expression in piecewise form. [6] seems to be a correct representation of the piecewise function p defined in [4]. |
@hanq08 in this case, The object defined in [4] is printed in [5]. [6] is different from [5], hence it is not a correct representation of the object defined in [4]. |
Does this work with the new |
@smichr I haven't tested it and I probably won't for a long time. |
I get the same on current master. |
I suspect that functions should have their own |
Maybe an easier to grasp example (found this when I was just about to post a new issue):
It shouldn't be folding if the Piecewise is the argument of an integral or, ideally, do it in a different way
which will be feasible for simple constraints. For indefinite integrals it is more tricky though.
|
Sympy 1.0-2 from Manjaro repository.
Needless to say, [5] and [6] should be identical.
The text was updated successfully, but these errors were encountered: