@@ -143,7 +143,7 @@ function prepare_derivative_nokwarg(
143143) where {F,C}
144144 _sig = signature (f, backend, x, contexts... ; strict)
145145 pushforward_prep = prepare_pushforward_nokwarg (
146- strict, f, backend, x, (one (x),), contexts...
146+ strict, f, backend, x, (oneunit (x),), contexts...
147147 )
148148 return PushforwardDerivativePrep (_sig, pushforward_prep)
149149end
@@ -153,7 +153,7 @@ function prepare_derivative_nokwarg(
153153) where {F,C}
154154 _sig = signature (f!, y, backend, x, contexts... ; strict)
155155 pushforward_prep = prepare_pushforward_nokwarg (
156- strict, f!, y, backend, x, (one (x),), contexts...
156+ strict, f!, y, backend, x, (oneunit (x),), contexts...
157157 )
158158 return PushforwardDerivativePrep (_sig, pushforward_prep)
159159end
@@ -169,7 +169,7 @@ function value_and_derivative(
169169) where {F,C}
170170 check_prep (f, prep, backend, x, contexts... )
171171 y, ty = value_and_pushforward (
172- f, prep. pushforward_prep, backend, x, (one (x),), contexts...
172+ f, prep. pushforward_prep, backend, x, (oneunit (x),), contexts...
173173 )
174174 return y, only (ty)
175175end
@@ -184,7 +184,7 @@ function value_and_derivative!(
184184) where {F,C}
185185 check_prep (f, prep, backend, x, contexts... )
186186 y, _ = value_and_pushforward! (
187- f, (der,), prep. pushforward_prep, backend, x, (one (x),), contexts...
187+ f, (der,), prep. pushforward_prep, backend, x, (oneunit (x),), contexts...
188188 )
189189 return y, der
190190end
@@ -197,7 +197,7 @@ function derivative(
197197 contexts:: Vararg{Context,C} ,
198198) where {F,C}
199199 check_prep (f, prep, backend, x, contexts... )
200- ty = pushforward (f, prep. pushforward_prep, backend, x, (one (x),), contexts... )
200+ ty = pushforward (f, prep. pushforward_prep, backend, x, (oneunit (x),), contexts... )
201201 return only (ty)
202202end
203203
@@ -210,7 +210,7 @@ function derivative!(
210210 contexts:: Vararg{Context,C} ,
211211) where {F,C}
212212 check_prep (f, prep, backend, x, contexts... )
213- pushforward! (f, (der,), prep. pushforward_prep, backend, x, (one (x),), contexts... )
213+ pushforward! (f, (der,), prep. pushforward_prep, backend, x, (oneunit (x),), contexts... )
214214 return der
215215end
216216
@@ -226,7 +226,7 @@ function value_and_derivative(
226226) where {F,C}
227227 check_prep (f!, y, prep, backend, x, contexts... )
228228 y, ty = value_and_pushforward (
229- f!, y, prep. pushforward_prep, backend, x, (one (x),), contexts...
229+ f!, y, prep. pushforward_prep, backend, x, (oneunit (x),), contexts...
230230 )
231231 return y, only (ty)
232232end
@@ -242,7 +242,7 @@ function value_and_derivative!(
242242) where {F,C}
243243 check_prep (f!, y, prep, backend, x, contexts... )
244244 y, _ = value_and_pushforward! (
245- f!, y, (der,), prep. pushforward_prep, backend, x, (one (x),), contexts...
245+ f!, y, (der,), prep. pushforward_prep, backend, x, (oneunit (x),), contexts...
246246 )
247247 return y, der
248248end
@@ -256,7 +256,7 @@ function derivative(
256256 contexts:: Vararg{Context,C} ,
257257) where {F,C}
258258 check_prep (f!, y, prep, backend, x, contexts... )
259- ty = pushforward (f!, y, prep. pushforward_prep, backend, x, (one (x),), contexts... )
259+ ty = pushforward (f!, y, prep. pushforward_prep, backend, x, (oneunit (x),), contexts... )
260260 return only (ty)
261261end
262262
@@ -270,7 +270,9 @@ function derivative!(
270270 contexts:: Vararg{Context,C} ,
271271) where {F,C}
272272 check_prep (f!, y, prep, backend, x, contexts... )
273- pushforward! (f!, y, (der,), prep. pushforward_prep, backend, x, (one (x),), contexts... )
273+ pushforward! (
274+ f!, y, (der,), prep. pushforward_prep, backend, x, (oneunit (x),), contexts...
275+ )
274276 return der
275277end
276278
0 commit comments