-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
diff(f,t) should work even with Function objects #17701
Comments
comment:1
Possibly related to the shenanigans induced by the distinction at #17447? So maybe user error (though obviously completely understandable given the terrible documentation for this)? Agreed on the uselessness of the error message, though presumably the traceback would help an experienced Sage developer... who is not the likely recipient of an error message on this, unfortunately! More like someone in calculus or ODE. Yuck. |
This comment has been minimized.
This comment has been minimized.
comment:5
However, having |
Author: Ralf Stephan |
New commits:
|
Commit: |
This comment has been minimized.
This comment has been minimized.
Reviewer: Travis Scrimshaw |
comment:9
Should we expect this to work?
Also, in an effort to be an uniform with python, could you make the error message start with a lowercase letter? |
comment:10
Replying to @tscrim:
I'd say no. This would be significant feature creep into the interface of I am a little worried about
where almost certainly a user who would type this would be hoping for
I think the ambiguity in meaning when multiple arguments are given makes it safer to disallow it altogether. I wouldn't mind if we wouldn't support this at all, but if we do, I recommend that we only allow repetition of a single argument variable, and interpret it as the n-th derivative of a univariate function evaluated at that argument |
comment:12
With Sage develop:
So an error does only happen with anonymous functions ( With this branch there is
of which the latter has to be improved according to Nils. |
This comment has been minimized.
This comment has been minimized.
comment:14
Replying to @rwst:
I'd say the first ones need to be improved as well: if Having derivatives of functions with anonymous argument with respect to a named variable result in error seems desirable to me and that's the current behaviour. So I'd advocate for closing this ticket as "notabug/wontfix". |
comment:15
I agree with you that there is no reasonable well-defined behavior and anything other than an error will likely cause confusion. However, the error message is a bit cryptic, and suggests to me that this behavior might accidentally be changed. Perhaps we can try to clean that up a bit? |
comment:16
Replying to @tscrim:
Sure, catching the call and raising a different error would be fine with me. |
The same error can be had with the simple
SR(sin)
, i.e., any function object in contrast to the resp. function call, which returns anExpression
.Since function objects can be used in other context it seems they should be part of symbolic expressions too. This ticket however will limit itself to giving a better error message in
SR.coerce
and handlingFunction
objects incalculus/functional.py:derivative()
.See also #15025
Component: calculus
Author: Ralf Stephan
Branch/Commit: u/rws/diff_f_t__should_work_even_with_function_objects @
0cecec3
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/17701
The text was updated successfully, but these errors were encountered: