JuliaDiff / AbstractDifferentiation.jl

An abstract interface for automatic differentiation.
https://juliadiff.org/AbstractDifferentiation.jl/
MIT License
135 stars 18 forks source link

Only support tuples and not single inputs/outputs #103

Closed gdalle closed 1 year ago

gdalle commented 1 year ago

The ambiguity between tuples and single inputs/outputs in pushforwards and pullbacks is causing several bugs (#99) and making the code more complicated.

I propose to make a breaking change that supports only tuples

cc @devmotion

devmotion commented 1 year ago

An alternative would be https://github.com/JuliaDiff/AbstractDifferentiation.jl/issues/53

gdalle commented 1 year ago

Good point. How to decide between the two? Would one be

gdalle commented 1 year ago

On second thought they're actually the same, replacing args... with args everywhere does the translation

mohamed82008 commented 1 year ago

I think it should be fine to only support tuples. I don't recall why we support both but we can just support one.

gdalle commented 1 year ago

Only supporting plain inputs / outputs as in #53 sounds slightly more natural though, doesn't it?

mohamed82008 commented 1 year ago

that's also fine by me

gdalle commented 1 year ago

Closing this in favor of #53 then