In #143, expand was introduced to pad keyword arguments to the length of the number of sweeps by repeating the last value, for example maxdim=[10, 20] gets expanded to maxdim=[10, 20, 20, 20] if nsweeps=4.
Keyword arguments are treated as nested table-like objects, inspired by the perspective of Tables.jl where a NamedTuple with values that are vectors of a common length can be interpreted as a table where the vectors are named columns of a table.
It could be nice to formalize that perspective a little bit more and turn that concept into a subpackage and see how it connects to other functionality in the Julia Tables/DataFrames ecosystem.
One thing I came across is that what we called expand in #143 can be viewed as a certain technique for filling in missing data in data sets (say from clinical trials) called last observation carried forward (LOCF), which is implemented as an operation on DataFrames in Impute.locf.
I thought that was an interesting perspective and connection to keep in mind, possibly for generalizing or formalizing our keyword argument processing code or choosing a name for that operation that aligns with known operations in data processing.
In #143,
expand
was introduced to pad keyword arguments to the length of the number of sweeps by repeating the last value, for examplemaxdim=[10, 20]
gets expanded tomaxdim=[10, 20, 20, 20]
ifnsweeps=4
.Keyword arguments are treated as nested table-like objects, inspired by the perspective of Tables.jl where a
NamedTuple
with values that are vectors of a common length can be interpreted as a table where the vectors are named columns of a table.It could be nice to formalize that perspective a little bit more and turn that concept into a subpackage and see how it connects to other functionality in the Julia Tables/DataFrames ecosystem.
One thing I came across is that what we called
expand
in #143 can be viewed as a certain technique for filling in missing data in data sets (say from clinical trials) called last observation carried forward (LOCF), which is implemented as an operation onDataFrame
s in Impute.locf.I thought that was an interesting perspective and connection to keep in mind, possibly for generalizing or formalizing our keyword argument processing code or choosing a name for that operation that aligns with known operations in data processing.