Skip to content

Commit

Permalink
Use vec to avoid indexing with a matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Jul 15, 2016
1 parent 670372b commit b388e58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/statsmodels/formula.jl
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ function ModelMatrix(mf::ModelFrame)
ff = trms.factors[:, fetrms]
## need to be cautious here to avoid evaluating cols for a factor with many levels
## if the factor doesn't occur in the fetrms
rows = Bool[x != 0 for x in sum(ff, 2)]
rows = Bool[x != 0 for x in vec(sum(ff, 2))]
ff = ff[rows, :]
cc = [cols(col) for col in columns(mf.df[:, rows])]
for j in 1:size(ff,2)
Expand Down

0 comments on commit b388e58

Please sign in to comment.