diff --git a/Project.toml b/Project.toml index 166411d6..30df8f5e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Bijectors" uuid = "76274a88-744f-5084-9051-94815aaf08c4" -version = "0.13.2" +version = "0.13.3" [deps] ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197" diff --git a/src/utils.jl b/src/utils.jl index f511cf7b..ada4ae64 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -30,7 +30,7 @@ function triu_mask(X::AbstractMatrix, k::Int) # Using `similar` allows us to respect device of array, etc., e.g. `CuArray`. m = similar(X, Bool) - return triu!(fill!(m, true), k) + return triu!(fill!(parent(m), true), k) end ChainRulesCore.@non_differentiable triu_mask(X::AbstractMatrix, k::Int)