-
Notifications
You must be signed in to change notification settings - Fork 25
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
Should to_vec(::Integer)
return an empty vector
#188
Comments
This would make sense to me. |
The practical problem with this, is that sometimes people want to test special case methods that take integers. But they might still want to test it against custom rules that do. Right now we often (always?) error for it |
Could you provide an example @oxinabox ? I'm not really clear what sort of thing you're imagining. |
For example
|
And what we're proposing to do here would solve this problem, yes? |
Would it? Cool! |
Isn't this example the thing which already works? Integer taken to mean non-differentiable:
|
Oh, yeah, this particular example is. I think stuff would need to be nested in order to break it. |
Integers can't be perturbed, so their
to_vec
should be empty. Originally suggested in #187Would also fix (a part of) chrisbrahms/Hankel.jl#27
Did not test yet whether it messes up any existing ChainRules tests.
The text was updated successfully, but these errors were encountered: