TuringLang / Bijectors.jl

Implementation of normalising flows and constrained random variable transformations
https://turinglang.org/Bijectors.jl/
MIT License
200 stars 33 forks source link

Use `parent` when `fill!` a triangular matrix #278

Closed harisorgn closed 1 year ago

harisorgn commented 1 year ago

fill! does not work with triangular matrices (nor does .=). Here we access the parent type of a triangular matrix before filling as per @torfjelde 's suggestion.

Fixes some issues in https://github.com/TuringLang/Turing.jl/pull/2018