Skip to content

Commit 757234a

Browse files
committed
Fix _with_ladj_on_mapped
Was causing trouble with broadcast over scalars (that returns a scalar).
1 parent 3f6a1d7 commit 757234a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/with_ladj.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ with_logabsdet_jacobian(f, x) = NoLogAbsDetJacobian(f, x)
117117
end
118118

119119

120+
function _with_ladj_on_mapped(@nospecialize(map_or_bc::F), y_with_ladj::NoLogAbsDetJacobian) where {F<:Union{typeof(map),typeof(broadcast)}}
121+
return y_with_ladj
122+
end
123+
120124
function _with_ladj_on_mapped(map_or_bc::F, y_with_ladj::Tuple{Any,Real}) where {F<:Union{typeof(map),typeof(broadcast)}}
121125
return y_with_ladj
122126
end

0 commit comments

Comments
 (0)