TuringLang / Bijectors.jl

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

making rqs compatible with float32 input #267

Closed zuhengxu closed 1 year ago

zuhengxu commented 1 year ago

A simple fix to issue #266.

torfjelde commented 1 year ago

Btw, can you bump the patch version?

zuhengxu commented 1 year ago

Btw, can you bump the patch version?

just did!

Looks good (a few allocations could be removed), could we also add tests for the bug?

@devmotion sure! What kind of tests you want to include? Like the changed code returns the same value as the original one given Float64 inputs?

devmotion commented 1 year ago

The failing example in https://github.com/TuringLang/Bijectors.jl/issues/266 would be good, I think. That is, ensuring that the construction does not error. And then probably, as you suggested (I think), a quick consistency check against the Float64 version would be reasonable.

zuhengxu commented 1 year ago

The failing example in #266 would be good, I think. That is, ensuring that the construction does not error. And then probably, as you suggested (I think), a quick consistency check against the Float64 version would be reasonable.

Tests included. No error!

yebai commented 1 year ago

Thanks, @zuhengxu -- congrats on the first successful Turing PR!