Closed femtotrader closed 6 years ago
@femtotrader Out of curiosity, why might this be a desired feature?
n_runs
have a default value, I think only keyword arguments can have default value, not positionnal arguments
Positional arguments can have a default value. It's just that the default value cannot be changed by name, only by position.
julia> f(a, b::Int=1) = a + b
f (generic function with 2 methods)
julia> a = rand(3,3)
3×3 Array{Float64,2}:
0.677264 0.910714 0.818402
0.638666 0.976895 0.98091
0.939763 0.105193 0.575674
julia> f(a)
3×3 Array{Float64,2}:
1.67726 1.91071 1.8184
1.63867 1.97689 1.98091
1.93976 1.10519 1.57567
julia> f(a, 2)
3×3 Array{Float64,2}:
2.67726 2.91071 2.8184
2.63867 2.97689 2.98091
2.93976 2.10519 2.57567
There is an inconsistancy between 2 function calls
get_run_params
calls get_param_combos
with n_runs
as keyword argument (which lead to an error that I'm fixing in #15 )
On the other side, optimize
and optimize!
call get_param_combos
with n_runs
as positional argument
So anyway I think there is a fix to do.
Renaming issue "get_run_params is broken" because a fix can be done without adding a keyword argument to get_param_combos
Pull request merged, closing this now.