-
-
Notifications
You must be signed in to change notification settings - Fork 453
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 functions done right #14801
Comments
comment:1
Patch is just a first proof of concept now |
Updated patch |
comment:3
Attachment: trac_14801_piecewiese.patch.gz |
New commits:
|
Commit: |
Branch: public/piecewise |
comment:7
Many doctests fail in the new code. For example:
I am not well versed in Python. I think there is maybe a problem in
Apparently |
comment:8
There is new code for |
comment:9
Ok, with the dependencies #13125 and #14802 there remain two failing doctests in
and the same in line |
comment:10
It appears that by checking
but, since the old class didn't bother, it accepted all input. So the doctests in the old class will fail because the old class is redirected to the new. Personally I would just remove all doctests from the old class instead of fiddling together 200 working ones for a deprecated class. Is this allowed? In any case I consider the restriction to reals surprising. At least I would want to see a better error msg. |
comment:11
Yeah, I don't know how we are going to deal with this. I suspect we should have |
Changed author from Volker Braun to Volker Braun, Ralf Stephan |
comment:12
My solution would be to leave New commits:
|
Changed branch from public/piecewise to public/piecewise-alt |
comment:14
Now on to the remaining two errors. This code throws:
It works however if I patch
So, as this fixes it and passes tests, I'm committing and proposing this branch for review. New commits:
|
comment:55
The solution is to change the doctest to:
Or, if function objects are used to apply the call inside |
comment:57
That should be it. |
comment:59
See also #8603 regarding the most recent additions - thanks for doing them. |
comment:61
Thanks for working on it... I'm of course happy with your changes. |
Reviewer: Volker Braun, Ralf Stephan |
comment:62
And I'm so with your part of this. |
comment:63
Ralf and Volker have done such great work on this and I really am very much looking forward to this being put into Sage. Also, I don't see any examples which used to work but don't work with the new version you've made. A comment on how I tested this (since I don't know git), I downloaded your piecewise.py file from git. Added it to a new version of SageMath (since "sage -clone" no longer works) and ran "sage -b". Then I started sage and just ran then examples in the docstring. I tweeked several just to see how minor changes affected things. They all went perfectly. |
Changed branch from public/piecewise-2 to |
Rewrite piecewise functions as symbolic functions.
For a (late) discussion about interface issues see https://groups.google.com/forum/?hl=en#!topic/sage-devel/dgwUMsdiHfM
Depends on #14800
Depends on #14780
Depends on #13125
Depends on #14802
Depends on #16397
Depends on #17759
CC: @eviatarbach @kcrisman @slel @mkoeppe
Component: symbolics
Author: Volker Braun, Ralf Stephan
Branch/Commit:
966859c
Reviewer: Volker Braun, Ralf Stephan
Issue created by migration from https://trac.sagemath.org/ticket/14801
The text was updated successfully, but these errors were encountered: