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

Support for unitful parameters #1592

Closed
juliohm opened this issue Jul 14, 2022 · 1 comment
Closed

Support for unitful parameters #1592

juliohm opened this issue Jul 14, 2022 · 1 comment

Comments

@juliohm
Copy link
Contributor

juliohm commented Jul 14, 2022

Anyone else thinks that it would be important to support unitful parameters? In particular, I think that Normal(1u"K", 1u"K") could work?

It currently doesn't work because the constructors of the distributions have strict Real argument types. Can we simply erase this type annotation and fix the code accordingly when possible? I am happy to submit a PR for Normal as a test case.

@devmotion
Copy link
Member

I'm not fundamentally against it and would review a PR. However, one has to be careful that the results of pdf, cdf etc. have the correct units. It also requires changes in StatsFuns which currently only supports Real parameters: https://github.com/JuliaStats/StatsFuns.jl/blob/master/src/distrs/norm.jl

See #1413.

I'll close this issue as a duplicate of #1413.

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

2 participants