From 55501ae8e6fbb414b743fdf10be34f3275616464 Mon Sep 17 00:00:00 2001 From: Tor Erlend Fjelde Date: Sat, 30 Nov 2024 15:17:18 +0100 Subject: [PATCH] Fix for some type instabilities (#354) * improvement to type-stability of `_logabsdetjac_dist` for batched multivariate distributions * bumped patch version --- Project.toml | 2 +- src/Bijectors.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 18586cd5..2db72fbc 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Bijectors" uuid = "76274a88-744f-5084-9051-94815aaf08c4" -version = "0.15" +version = "0.15.1" [deps] ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197" diff --git a/src/Bijectors.jl b/src/Bijectors.jl index 389b3e46..df7e3db0 100644 --- a/src/Bijectors.jl +++ b/src/Bijectors.jl @@ -191,7 +191,7 @@ function _logabsdetjac_dist(d::MultivariateDistribution, x::AbstractVector) return logabsdetjac(bijector(d), x) end function _logabsdetjac_dist(d::MultivariateDistribution, x::AbstractMatrix) - return logabsdetjac.((bijector(d),), eachcol(x)) + return map(Base.Fix1(logabsdetjac, bijector(d)), eachcol(x)) end _logabsdetjac_dist(d::MatrixDistribution, x::AbstractMatrix) = logabsdetjac(bijector(d), x)