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

product_distribution deprecated? #1589

Closed
oschulz opened this issue Jul 11, 2022 · 3 comments · Fixed by #1590
Closed

product_distribution deprecated? #1589

oschulz opened this issue Jul 11, 2022 · 3 comments · Fixed by #1590

Comments

@oschulz
Copy link
Contributor

oschulz commented Jul 11, 2022

This is confusing:

julia> product_distribution(fill(Weibull(), 5))
┌ Warning: `product_distribution(dists::AbstractVector{<:UnivariateDistribution})` is deprecated, use `Product(dists)` instead.

But also

julia> Distributions.Product(fill(Weibull(), 5))
┌ Warning: `Product(v)` is deprecated, please use `product_distribution(v)`
@devmotion
Copy link
Member

Ah I think I might have messed up this when I reverted product_distribution(::AbstractVector{<:UnivariateDistribution}) to return a Product to avoid breaking changes.

Probably we should just remove both deprecations for now. Product will be removed but since users are not supposed to use Product directly they would get a deprecation warning even if they use product_distribution. And there's not really any future-proof alternative (I think) for users to product_disttribution as they are not supposed to call ProductDistribution either.

@oschulz
Copy link
Contributor Author

oschulz commented Jul 11, 2022

And there's not really any future-proof alternative (I think) for users to product_disttribution

I agree, we need it to turn vectors of Normal to MvNormal and so on after all.

@devmotion
Copy link
Member

Yes, exactly. These conversions are also not deprecated and won't be removed.

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

Successfully merging a pull request may close this issue.

2 participants