Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend testvalue with a ::Type argument #139

Closed
cscherrer opened this issue Aug 15, 2021 · 0 comments
Closed

Extend testvalue with a ::Type argument #139

cscherrer opened this issue Aug 15, 2021 · 0 comments

Comments

@cscherrer
Copy link
Collaborator

cscherrer commented Aug 15, 2021

It would be useful to test somehow that logdensity does not needlessly promote. e.g. if the measure's parameters have a real eltype of Float32, and so does the test value, then logdensity should not promote to Float64.

Originally posted by @sethaxen in #137 (comment)

We should add methods so that for any measure d,

  1. logdensity(d, testvalue(d)) isa Float64
  2. logdensity(d, testvalue(T, d)) isa T
@cscherrer cscherrer changed the title It would be useful to test somehow that logdensity does not needlessly promote. e.g. if the measure's parameters have a real eltype of Float32, and so does the test value, then logdensity should not promote to Float64. Extend testvalue with a ::Type argument Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant