Skip to content

Commit

Permalink
Use parent when fill! a triangular matrix (#278)
Browse files Browse the repository at this point in the history
* use `parent` when `fill!` a triangular matrix

* bump patch
  • Loading branch information
harisorgn authored Jul 25, 2023
1 parent 9cd5907 commit 74d52d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

2 comments on commit 74d52d4

@yebai
Copy link
Member

@yebai yebai commented on 74d52d4 Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/88278

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.13.3 -m "<description of version>" 74d52d4eda72a6149b1a89b72524545525419b3f
git push origin v0.13.3

Please sign in to comment.