-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In order to properly stack i.i.d. variables in a vector, I suggest to introduce a sort of broadcasting for (some of?) ::Univariate nodes.
Let’s say, I have a distribution, for example, Gamma, which is available only as ::Univariate. I can do that:
D = 2
x = Vector{Variable}(undef, D)
for d in 1:D
@RV x[d] ~ Gamma(1, 1)
endBut further in the code x is ::Vector{Variable}, so you cannot use it in the model with some kind of vector arithmetics. I'd rather want it as follows:
@RV x ~ Gamma(ones(2), ones(2))so that further x is a proper vector of two i.i.d. Gamma components.
The broadcast mimic option for Gamma node in this sense follows the spirit of other Julia packages (for instance, I can type pdf.(Gamma(1,1), x) where x can be either Array or scalar).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request