Skip to content

Commit d6c20f0

Browse files
supply init so productfeature works with only 1 variable
1 parent c59bb97 commit d6c20f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/model_matrix.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ end
1919
function _feature_columns(cont_vars, cat_vars, f::ProductFeature, nk)
2020
ks = keys(cont_vars)
2121
n = length(cont_vars)
22-
mapreduce(vcat, 1:(n-1)) do i
22+
mapreduce(vcat, 1:(n-1); init = Maxnet.ModelMatrixColumn[]) do i
2323
mapreduce(vcat, i+1:n) do j
2424
ModelMatrixColumn(f, ks[i], (ks[j], ))
2525
end

0 commit comments

Comments
 (0)