@@ -77,18 +77,18 @@ struct DifferentiateWith{C, F, B <: AbstractADType, N <: NTuple{C, Any}}
7777end
7878
7979function DifferentiateWith (
80- f:: F ,
81- backend:: B ,
82- context_wrappers:: NTuple{C, Any} ,
83- ) where {F, B <: AbstractADType , C}
80+ f:: F ,
81+ backend:: B ,
82+ context_wrappers:: NTuple{C, Any} ,
83+ ) where {F, B <: AbstractADType , C}
8484 for (i, wrapper) in pairs (context_wrappers)
8585 # Accept typical constructor-like values: functions or types.
8686 if ! (wrapper isa Function || wrapper isa Type)
8787 throw (
8888 ArgumentError (
8989 " Each context wrapper must be a callable object or type " *
90- " (e.g., a wrapper constructor like `Constant` or `Cache`), " *
91- " but element $i has type $(typeof (wrapper)) ." ,
90+ " (e.g., a wrapper constructor like `Constant` or `Cache`), " *
91+ " but element $i has type $(typeof (wrapper)) ." ,
9292 ),
9393 )
9494 end
@@ -99,7 +99,6 @@ function DifferentiateWith(
9999 context_wrappers,
100100 )
101101end
102- DifferentiateWith (f:: F , backend:: AbstractADType ) where {F} = DifferentiateWith (f, backend, ())
103102
104103function (dw:: DifferentiateWith{C} )(x, args:: Vararg{Any, C} ) where {C}
105104 return dw. f (x, args... )
0 commit comments