From 89257badbd613201960a5a5e7ed6bf08c4ed1b94 Mon Sep 17 00:00:00 2001 From: Tor Erlend Fjelde Date: Fri, 7 Oct 2022 00:44:53 +0100 Subject: [PATCH] Revert "remove inv as its deprecated" This reverts commit 36ed5e25aaec4c24b35a1b932a7301838e62e694. --- src/Bijectors.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Bijectors.jl b/src/Bijectors.jl index 8e00a9ca..193327fa 100644 --- a/src/Bijectors.jl +++ b/src/Bijectors.jl @@ -255,6 +255,11 @@ include("chainrules.jl") Base.@deprecate forward(b::AbstractBijector, x) NamedTuple{(:rv,:logabsdetjac)}(with_logabsdet_jacobian(b, x)) +@noinline function Base.inv(b::AbstractBijector) + Base.depwarn("`Base.inv(b::AbstractBijector)` is deprecated, use `inverse(b)` instead.", :inv) + inverse(b) +end + # Broadcasting here breaks Tracker for some reason maporbroadcast(f, x::AbstractArray{<:Any, N}...) where {N} = map(f, x...) maporbroadcast(f, x::AbstractArray...) = f.(x...)