File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 223
223
# #### `cumprod`
224
224
# ####
225
225
226
- function rrule (:: typeof (cumprod), x:: AbstractVector{<:Real} ; dims= 1 )
226
+ function rrule (:: typeof (cumprod), x:: AbstractVector{<:Real} ; dims:: Integer = 1 )
227
227
y = cumprod (x; dims= dims) # does nothing unless dims == 1
228
228
function cumprod_pullback_1 (dy)
229
229
dx_thunk = InplaceableThunk (
@@ -244,9 +244,8 @@ function rrule(::typeof(cumprod), x::AbstractVector{<:Real}; dims=1)
244
244
return y, cumprod_pullback_1
245
245
end
246
246
247
- function rrule (:: typeof (cumprod), x:: AbstractArray{<:Real} ; dims)
247
+ function rrule (:: typeof (cumprod), x:: AbstractArray{<:Real} ; dims:: Integer )
248
248
y = cumprod (x; dims= dims)
249
- @assert dims isa Integer
250
249
function cumprod_pullback_2 (dy)
251
250
dx_thunk = InplaceableThunk (
252
251
@thunk if dims <= ndims (x)
You can’t perform that action at this time.
0 commit comments