Open MatisPatel opened 3 years ago
d = Dict(:a => [1,2,3], :b => [1,2, @onlyif(:a==2, collect(3:5))...])
Splatting the @onlyif
should work.
Yep that works! Obvious in retrospect. Maybe this use case could just be added as an example to the docs?
Please do a PR that adds it to the "real world examples"?
Is your feature request related to a problem? Please describe. I have a parameter B that greatly increases search space. I want to investigate b only when some values of A are hit but I still want as a base line all values of A to be run on a subset of B.
Describe the solution you'd like
In the above line @onlyif doesn't expand across the container
collect(3:5)
. It just makes one dictionary with :b of that dict being an iterator3:5
.Describe alternatives you've considered
The above does work but it a tad messy. Maybe this is just a reasonable issue and the workaround is just the way to do it.